Varnish 4 on Debian 8 issue

stuartm varnishlist at amanzi.co.nz
Wed May 20 11:04:01 CEST 2015


Hi there,

I've been trying to figure out an issue with Varnish 4 on Debian 8 and have
found a reproducible problem that I'd like to report... What I found was
that the Varnish service was starting okay but it wasn't using any of the
parameters I had set in /etc/default/varnish. For example, I had set the
listening port to be 80, but Varnish would always start with port 6081.

After reading this blog post:
https://ma.ttias.be/debug-varnish-4-x-on-systemd-that-fails-to-start, I
realised that the Varnish service (/lib/systemd/system/varnish.service)
wasn't using any parameter files - instead it was hard coded to start with
the default values only. Here's the output of the
/lib/systemd/system/varnish.service file:

[Unit]
Description=Varnish HTTP accelerator

[Service]
Type=forking
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStartPre=/usr/sbin/varnishd -C -f /etc/varnish/default.vcl
ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f
/etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
ExecReload=/usr/share/varnish/reload-vcl

[Install]
WantedBy=multi-user.target

This blog post: https://ma.ttias.be/running-varnish-4-x-on-systemd/,
indicated that there should be an environments file located here:
/etc/varnish/varnish.params and this file would be referenced in the
varnish.service file on this line:
EnvironmentFile=/etc/varnish/varnish.params. But as you can see the
varnish.service script doesn't include that line and the parameters file
doesn't exist on my Debian 8 system.

This issue is reproducible as I've just built another clean system and
tried again using both the Debian package as well as the Varnish-hosted
package which I installed using these instructions:
https://www.varnish-cache.org/installation/debian

My temporary fix is to edit the varnish.service file and manually configure
the parameters to match my needs, but this isn't ideal.

Hope this report helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150520/c93ccfea/attachment-0001.html>


More information about the varnish-misc mailing list