Package: varnish
Version: 6.1.1-1+b1
Severity: normal

Dear Maintainer,

varnishlog fails to start on reboot:

2019-08-09T02:41:13.581+00:00 pawan varnishlog[784]: Starting HTTP 
accelerator log deamon: failed!
2019-08-09T02:41:13.581+00:00 pawan varnishlog[784]: ....
2019-08-09T02:41:13.581+00:00 pawan varnishlog[784]: VSM: Could not get 
hold of varnishd, is it running?
2019-08-09T02:41:13.581+00:00 pawan systemd[1]: varnishlog.service: 
Control process exited, code=exited, status=1/FAILURE
2019-08-09T02:41:13.581+00:00 pawan systemd[1]: varnishlog.service: 
Failed with result 'exit-code'.
2019-08-09T02:41:13.581+00:00 pawan systemd[1]: Failed to start LSB: 
Start HTTP accelerator log daemon.

It appears to be a timing issue restarting it manually works fine:

systemctl restart varnishlog.service

root@pawan:/var/log# systemctl status varnishlog
● varnishlog.service - LSB: Start HTTP accelerator log daemon
   Loaded: loaded (/etc/init.d/varnishlog; generated)
   Active: active (running) since Thu 2019-08-08 22:55:15 EDT; 1min 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6568 ExecStart=/etc/init.d/varnishlog start (code=exited, 
status=0/SUCCESS)
    Tasks: 1 (limit: 4915)
   Memory: 1.2M
   CGroup: /system.slice/varnishlog.service
           └─6576 /usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P 
/run/varnishlog/varnishlog.pid

Aug 08 22:55:15 pawan systemd[1]: Starting LSB: Start HTTP accelerator log 
daemon...
Aug 08 22:55:15 pawan varnishlog[6568]: Starting HTTP accelerator log deamon:.
Aug 08 22:55:15 pawan systemd[1]: Started LSB: Start HTTP accelerator log 
daemon.

That said, I am not really sure this even works.  The only reference I see to
varnishlog is:

root@pawan:/# find /lib/systemd/ /etc -name varnishlog\*
/etc/systemd/system/multi-user.target.wants/varnishlog.service
/etc/default/varnishlog
/etc/init.d/varnishlog

and varnishlog.service is a dangling symlink to:

/lib/systemd/system/varnishlog.service

it seems to some type of left-over from a previous version:

dpkg -S varnishlog
varnish: /usr/bin/varnishlog
varnish: /etc/init.d/varnishlog
varnish: /usr/share/man/man1/varnishlog.1.gz
varnish: /etc/default/varnishlog

So I stopped the service the service and removed the file:

# systemctl disable varnishlog.service
# systemctl stop varnishlog.service
# rm /etc/systemd/system/multi-user.target.wants/varnishlog.service

I wanted to document this, but maybe there is a cleanup process missing
somewhere?


/Allan

-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/24 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages varnish depends on:
ii  adduser               3.118
ii  gcc                   4:8.3.0-1
ii  libc6                 2.28-10
ii  libc6-dev [libc-dev]  2.28-10
ii  libedit2              3.1-20181209-1
ii  libjemalloc2          5.1.0-3
ii  libncursesw6          6.1+20181013-2
ii  libpcre3              2:8.39-12
ii  libtinfo6             6.1+20181013-2
ii  libvarnishapi2        6.1.1-1+b1
ii  lsb-base              10.2019051400

varnish recommends no packages.

Versions of packages varnish suggests:
pn  varnish-doc  <none>

-- Configuration Files:
/etc/default/varnish changed:
START=yes
NFILES=131072
MEMLOCK=82000
DAEMON_OPTS="-a :6081 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -s file,/var/lib/varnish/$(uname -n)/varnish_storage.bin,32G \
             -T localhost:6082 \
             -t 120"

/etc/default/varnishlog changed:
VARNISHLOG_ENABLED=1

/etc/logrotate.d/varnish changed:
/var/log/varnish/varnish.log {
        compress
        daily
        delaycompress
        missingok
        postrotate
                systemctl -q is-active varnishncsa.service &&
                        /usr/sbin/invoke-rc.d varnishncsa reload > /dev/null
                systemctl -q is-active varnishlog.service &&
                        /usr/sbin/invoke-rc.d varnishlog reload > /dev/null
        endscript
        rotate 30
}

/etc/varnish/default.vcl changed:
vcl 4.0;
import std;
backend default {
        .host = "127.0.0.1";
        .port = "8080";
}
sub vcl_backend_response {
        if (bereq.url ~ "^[^?]*\.(mp[34]|pdf|wav)(\?.*)?$") {
                unset beresp.http.set-cookie;
                set beresp.do_stream = true;
        } else if (bereq.uncacheable) {
        } else if (beresp.ttl <= 0s || beresp.http.Set-Cookie || 
beresp.http.Surrogate-control ~ "no-store" || (!beresp.http.Surrogate-Control 
&& beresp.http.Cache-Control ~ "no-cache|no-store|private") || beresp.http.Vary 
== "*") {
                # Mark as "Hit-For-Pass" for the next 2 minutes
                set beresp.ttl = 120s;
                set beresp.uncacheable = true;
        }
        return (deliver);
}
sub vcl_recv {
        if (req.url ~ 
"^[^?]*\.(css|gif|jpeg|jpg|js|pdf|mp3|mp4|png|txt|wav)(\?.*)?$") {
                unset req.http.Cookie;
                return (hash);
        }
}


-- no debconf information

Reply via email to