L
L
lagudal2021-02-09 17:56:06
ubuntu
lagudal, 2021-02-09 17:56:06

Why is varnishlog not working and how to fix it?

given: ubuntu server 18.04, varnish 6.2.2, as a proxy on port 80, nginx on 8080.
Everything is fine on a couple of other servers, but something like varnishlog, varnishtop do not work.
Outputs:
varnishd -V

[email protected]:/etc/nginx/sites-available# varnishd -V
varnishd (varnish-6.2.2 revision 3ed1506895ecaddb91f658bee11742f0b0b982b5)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2019 Varnish Software AS

systemctl status varnish
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/etc/systemd/system/varnish.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-02-09 15:30:19 CET; 19min ago
  Process: 18328 ExecStart=/usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m (code=exited, status=0/SUCCESS)
 Main PID: 18329 (varnishd)
    Tasks: 217
   CGroup: /system.slice/varnish.service
           ├─18329 /usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m
           └─18341 /usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m

Feb 09 15:30:19 userver systemd[1]: Stopped Varnish Cache, a high-performance HTTP accelerator.
Feb 09 15:30:19 userver systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Feb 09 15:30:19 userver varnishd[18328]: Debug: Version: varnish-6.2.2 revision 3ed1506895ecaddb91f658bee11742f0b0b982b5
Feb 09 15:30:19 userver varnishd[18329]: Version: varnish-6.2.2 revision 3ed1506895ecaddb91f658bee11742f0b0b982b5
Feb 09 15:30:19 userver varnishd[18328]: Debug: Platform: Linux,4.15.0-121-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Feb 09 15:30:19 userver varnishd[18329]: Platform: Linux,4.15.0-121-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Feb 09 15:30:19 userver varnishd[18328]: Debug: Child (18341) Started
Feb 09 15:30:19 userver varnishd[18329]: Child (18341) Started
Feb 09 15:30:19 userver varnishd[18329]: Child (18341) said Child starts
Feb 09 15:30:19 userver systemd[1]: Started Varnish Cache, a high-performance HTTP accelerator.


systemctl start varnishncsa
[email protected]:/etc/nginx/sites-available# systemctl start varnishncsa
Job for varnishncsa.service failed because the control process exited with error code.
See "systemctl status varnishncsa.service" and "journalctl -xe" for details


systemctl status varnishncsa
● varnishncsa.service - Varnish Cache HTTP accelerator NCSA logging daemon
   Loaded: loaded (/lib/systemd/system/varnishncsa.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-02-09 15:37:56 CET; 13min ago
  Process: 18809 ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D (code=exited, status=1/FAILURE)

Feb 09 15:37:51 userver systemd[1]: Starting Varnish Cache HTTP accelerator NCSA logging daemon...
Feb 09 15:37:56 userver varnishncsa[18809]: .....
Feb 09 15:37:56 userver varnishncsa[18809]: VSM: Could not get hold of varnishd, is it running?
Feb 09 15:37:56 userver systemd[1]: varnishncsa.service: Control process exited, code=exited status=1
Feb 09 15:37:56 userver systemd[1]: varnishncsa.service: Failed with result 'exit-code'.
Feb 09 15:37:56 userver systemd[1]: Failed to start Varnish Cache HTTP accelerator NCSA logging daemon.

And how to run it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question