Varnish 4 on Debian 8 issue

Gabriel Filion gabster at lelutin.ca
Wed May 20 20:45:12 CEST 2015


fwiw I've seen the same issue. there's a bug report on debian about this
and the maintainer says the proper way to do things is to override the
.service file:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749272

imho it makes it harder to maintain throughout upgrades :\ but it would
seem as though "that's how things are done with systemd"

On 20/05/15 05:04 AM, stuartm wrote:
> 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.

-- 
Gabriel Filion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150520/f8268a09/attachment.pgp>


More information about the varnish-misc mailing list