Thank you! On Wed, Feb 8, 2017 at 12:20 PM, Guillaume Quintard < [email protected]> wrote:
> systemctl enable varnish > > ? > > But I thought the debian policy what to automatically start service though. > > -- > Guillaume Quintard > > On Wed, Feb 8, 2017 at 12:09 PM, Asbjorn Taugbol <[email protected]> > wrote: > >> Varnish 5 was installed from .deb package (dpkg -i >> varnish_5.0.0-1_amd64.deb) and with >> >> #service varnish start >> >> it starts and does its things very well. However, upon reboot it doesnt >> start automatically. There may be some mixup between old /etc/init.d stuff >> and newer systemd in debian/ubuntu. Here is some output for debugging this >> after a reboot: >> >> ---------------------- >> root@2:~# service varnish status >> ● varnish.service - Varnish Cache, a high-performance HTTP accelerator >> Loaded: loaded (/lib/systemd/system/varnish.service; disabled; vendor >> preset: >> Drop-In: /etc/systemd/system/varnish.service.d >> └─override.conf >> Active: inactive (dead) >> >> root@2:~# journalctl -xe|grep varnish >> >> root@2:~# cat /etc/systemd/system/varnish.service.d/override.conf >> [Service] >> ExecStart= >> ExecStart=/usr/sbin/varnishd -a :80 -a :9443 -a :9444 -T localhost:6082 >> -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m >> >> root@2:~# cat /etc/default/varnish >> # Configuration file for Varnish Cache. >> # >> # /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and >> $MEMLOCK >> # to be set from this shell script fragment. >> # >> # Note: If systemd is installed, this file is obsolete and ignored. You >> will >> # need to copy /lib/systemd/system/varnish.service to >> /etc/systemd/system/ and >> # edit that file. >> >> # Should we start varnishd at boot? Set to "no" to disable. >> START=yes >> >> # Maximum number of open files (for ulimit -n) >> NFILES=131072 >> >> # Maximum locked memory size (for ulimit -l) >> # Used for locking the shared memory log in memory. If you increase log >> size, >> # you need to increase this number as well >> MEMLOCK=82000 >> >> #DAEMON_OPTS="-a :80 \ >> DAEMON_OPTS="-a :80,:9443,:9444 \ >> -T localhost:6082 \ >> -f /etc/varnish/default.vcl \ >> -S /etc/varnish/secret \ >> -s malloc,256m" >> >> root@2:/etc# locate S01varnish >> /etc/rc2.d/S01varnish >> /etc/rc3.d/S01varnish >> /etc/rc4.d/S01varnish >> /etc/rc5.d/S01varnish >> >> root@2:/etc# ls -l rc2.d/S01varnish >> lrwxrwxrwx 1 root root 17 Jan 27 14:39 rc2.d/S01varnish -> >> ../init.d/varnish >> >> root@2:~# /etc/init.d/varnish start >> [ ok ] Starting varnish (via systemctl): varnish.service. >> root@2:~# <and all is well again> >> >> ----------------------------- >> >> Any input on this is highly appreciated. >> >> Thank you. >> >> -Asbjorn >> >> >> _______________________________________________ >> varnish-misc mailing list >> [email protected] >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
