Reloading in Varnish usually works like a charm, especially since the development of varnishreload. By using the ExecReload option in the Systemd service unit, Varnish can be reloaded using systemctl:
root@varnish:~# systemctl reload varnish-n1
But I ran into a situation when the reload of this Varnish instance didn't work. Instead an error showed up:
Job for varnish-n1.service failed.
See "systemctl status varnish-n1.service" and "journalctl -xe" for details.
By looking closer at the status output, important hints can be found:
root@varnish:~# systemctl status varnish-n1.service
- varnish-n1.service - Varnish HTTP accelerator for N1
Loaded: loaded (/etc/systemd/system/varnish-n1.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-12-07 10:29:17 CET; 1 months 27 days ago
Docs: https://www.varnish-cache.org/docs/4.1/
man:varnishd
Process: 2886833 ExecReload=/usr/sbin/varnishreload -n varnish-n1 (code=exited, status=1/FAILURE)
Main PID: 1175 (varnishd)
Tasks: 220 (limit: 9450)
Memory: 99.5M
CGroup: /system.slice/varnish-n1.service
|- 1175 /usr/sbin/varnishd -j unix,user=vcache -n varnish-n1 -F -a :7083 -T localhost:7084 -f /etc/varnish/n1.vcl -S /etc/varnish/secret -s malloc,128m
|- 1354 /usr/sbin/varnishd -j unix,user=vcache -n varnish-n1 -F -a :7083 -T localhost:7084 -f /etc/varnish/n1.vcl -S /etc/varnish/secret -s malloc,128m
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: Incompatible VMOD std
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: File name: /usr/lib/varnish-plus/vmods/libvmod_std.so
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: ABI mismatch, expected <Varnish Plus 6.0.8r1 96a565db42d1ba89c21a3caa1b06a42d296581f3>, got <Varnish Plus 6.0.9r4 89b7b028f75a0cb5ceb3f58c78d909081f60f6ff>
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: ('/etc/varnish/baum-regio.vcl' Line 3 Pos 8)
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: import std;
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: -------###-
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: Running VCC-compiler failed, exited with 2
Feb 03 16:24:31 onl-lb01-s varnishreload[2886833]: VCL compilation failed
Feb 03 16:24:31 onl-lb01-s systemd[1]: varnish-baum-regio.service: Control process exited, code=exited, status=1/FAILURE
Feb 03 16:24:31 onl-lb01-s systemd[1]: Reload failed for Varnish HTTP accelerator for Baum-Regio.
The reload didn't work because during the VCL compilation (which happens at every start or reload of Varnish), the "std" vmod was marked as incompatible. Further down the error shows why:
ABI mismatch, expected <Varnish Plus 6.0.8r1 96a565db42d1ba89c21a3caa1b06a42d296581f3>, got <Varnish Plus 6.0.9r4 89b7b028f75a0cb5ceb3f58c78d909081f60f6ff>
This situation can happen, when the Varnish package was upgraded, but the Varnish service(s) not yet restarted. This keeps the old binary and vmod versions in memory, as long as the process is running. This can be verified on the system, by checking the currently installed Varnish package (here varnish-plus):
root@varnish:~# dpkg -l|grep varnish-plus
ii varnish-plus 6.0.9r4-1~focal amd64 A supercharged version of the popular web cache, Varnish Cache
The varnish-n1 instance still runs with the older 6.0.8r1 version - but 6.0.9r4 is now installed.
Only a restart of the service/process can fix this situation. It is anyway recommended to apply the fixes from the upgraded package.
root@varnish:~# systemctl restart varnish-n1
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder