<div dir="ltr"><span style="color:rgb(0,0,0);font-size:12.8000001907349px">Hi there,</span><div style="color:rgb(0,0,0);font-size:12.8000001907349px"><div><br></div><div><div>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.</div><div><br></div><div>After reading this blog post: <a href="https://ma.ttias.be/debug-varnish-4-x-on-systemd-that-fails-to-start" target="_blank">https://ma.ttias.be/debug-varnish-4-x-on-systemd-that-fails-to-start</a>, 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:</div><div><br></div><div><div>[Unit]</div><div>Description=Varnish HTTP accelerator</div><div><br></div><div>[Service]</div><div>Type=forking</div><div>LimitNOFILE=131072</div><div>LimitMEMLOCK=82000</div><div>ExecStartPre=/usr/sbin/varnishd -C -f /etc/varnish/default.vcl</div><div>ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m</div><div>ExecReload=/usr/share/varnish/reload-vcl</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div></div><div><br></div><div>This blog post: <a href="https://ma.ttias.be/running-varnish-4-x-on-systemd/" target="_blank">https://ma.ttias.be/running-varnish-4-x-on-systemd/</a>, 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.</div><div><br></div><div>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: <a href="https://www.varnish-cache.org/installation/debian" target="_blank">https://www.varnish-cache.org/installation/debian</a></div><div><br></div><div>My temporary fix is to edit the varnish.service file and manually configure the parameters to match my needs, but this isn't ideal.</div><div><br></div><div>Hope this report helps.</div></div></div><div class="" style="color:rgb(0,0,0);font-size:12.8000001907349px"></div></div>