Fedora 30 LAMP Web Server Varnish Cache Broken After Update
-
If you just updated to Fedora 30 and you run a Varnish cache, you might notice that your cache stops working, and most likely this means that you are getting errors that your website is down. If you check your ports in use, using a command like netstat -tulpn you may notice that Varnish is not listening on the port that you expect it to.
For some reason, Fedora 30 does not maintain the same configuration files as Fedora 29. A Varnish configuration that works on 29 will not carry forward to 30. On Fedora 29 we configured /etc/varnish/varnish.params to set the listening port for Varnish. But on Fedora 30 we need to edit:
vi /etc/systemd/system/multi-user.target.wants/varnish.service
In this file you need to look for the ExecStart line. This line runs Varnish and does not read the params file like it should. The port on which Varnish listens is hard coded into this file inappropriately. In mine, the port defaulted to 6081, but I wanted it on 80.
The default line looked like this:
ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
But I had to alter it to:
ExecStart=/usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m
Then to get the changes to take effect:
systemctl daemon-reload systemctl restart varnish
-
Here is a copy of a complete file:
[Unit] Description=Varnish Cache, a high-performance HTTP accelerator After=network-online.target [Service] Type=forking KillMode=process # Maximum number of open files (for ulimit -n) LimitNOFILE=131072 # Locked shared memory - should suffice to lock the shared memory log # (varnishd -l argument) # Default log size is 80MB vsl + 1M vsm + header -> 82MB # unit is bytes LimitMEMLOCK=85983232 # Enable this to avoid "fork failed" on reload. TasksMax=infinity # Maximum size of the corefile. LimitCORE=infinity ExecStart=/usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m ExecReload=/usr/sbin/varnishreload [Install] WantedBy=multi-user.target
-
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
-
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They are worse don’t even try and say otherwise.
-
@JaredBusch said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They are worse don’t even try and say otherwise.
Sarcasm, I used.
-
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@JaredBusch said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They are worse don’t even try and say otherwise.
Sarcasm, I used.
It is kinda hard to follow sarcasm over text. However CentOS had same sort of issue which enabled postfix use of port 25 on the devices which didn't have it enabled before.
-
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They accidentally hard coded to the default.
-
@scottalanmiller said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They accidentally hard coded to the default.
did you report it?
-
@Dashrender said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@scottalanmiller said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
@Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:
Wow so they just decide to up and change ports? And I thought Windows updates were bad...
They accidentally hard coded to the default.
did you report it?
Unlikely.
-
Worth noting that the issue comes back when you upgrade to Fedora 31 as well. Same fix still applies.