Varnish 4.1重启后无法启动,Nginx - PHP 7.1.2
service varnish status
Redirecting to /bin/systemctl status varnish.service
* varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/usr/lib/systemd/system/varnish.service; disabled; vendor pre set: disabled)
Active: inactive (dead)
Mar 10 22:03:29 server1 varnishd[4993]: Platform: Linux,2.6.32-042stab120.18...t
Mar 10 22:03:29 server1 systemd[1]: Started Varnish Cache, a high-performan...r.
Mar 10 22:03:29 server1 varnishd[4993]: Child (4994) Started
Mar 10 22:03:30 server1 varnishd[4993]: Child (4994) said Child starts
Mar 10 22:07:43 server1 varnishd[4993]: Manager got SIGINT
Mar 10 22:07:43 server1 systemd[1]: Stopping Varnish Cache, a high-performa.....
Mar 10 22:07:43 server1 varnishd[4993]: Stopping Child
Mar 10 22:07:44 server1 varnishd[4993]: Child (4994) died signal=15
Mar 10 22:07:44 server1 varnishd[4993]: Child cleanup complete
Mar 10 22:07:44 server1 systemd[1]: Stopped Varnish Cache, a high-performan...r.
Hint: Some lines were ellipsized, use -l to show in full.
我可以开始清漆服务
service varnish start
Redirecting to /bin/systemctl start varnish.service
service varnish status
Redirecting to /bin/systemctl status varnish.service
* varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/usr/lib/systemd/system/varnish.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2017-03-10 23:16:19 UTC; 1min 59s ago
Process: 1605 ExecStart=/usr/sbin/varnishd -P /var/run/varnish.pid -f $VARNISH_VCL_CONF -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} -S $VARNISH_SECRET_FILE -s $VARNISH_STORAGE $DAEMON_OPTS (code=exited, status=0/SUCCESS)
Main PID: 1615 (varnishd)
CGroup: /system.slice/varnish.service
|-1615 /usr/sbin/varnishd -P /var/run/varnish.pid -f /etc/varnish/default.vcl -a :80 -T 127.0.0.1:6082 -S /etc/varnis...
`-1616 /usr/sbin/varnishd -P /var/run/varnish.pid -f /etc/varnish/default.vcl -a :80 -T 127.0.0.1:6082 -S /etc/varnis...
Mar 10 22:07:43 server1 systemd[1]: Stopping Varnish Cache, a high-performance HTTP accelerator...
Mar 10 22:07:43 server1 varnishd[4993]: Stopping Child
Mar 10 22:07:44 server1 varnishd[4993]: Child (4994) died signal=15
Mar 10 22:07:44 server1 varnishd[4993]: Child cleanup complete
Mar 10 22:07:44 server1 systemd[1]: Stopped Varnish Cache, a high-performance HTTP accelerator.
Mar 10 23:16:19 server1 systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Mar 10 23:16:19 server1 varnishd[1615]: Platform: Linux,2.6.32-042stab120.18,x86_64,-junix,-smalloc,-smalloc,-hcritbit
Mar 10 23:16:19 server1 systemd[1]: Started Varnish Cache, a high-performance HTTP accelerator.
Mar 10 23:16:19 server1 varnishd[1615]: Child (1616) Started
Mar 10 23:16:19 server1 varnishd[1615]: Child (1616) said Child starts
我不确定这是什么原因,并且非常感谢所有帮助解决这个问题。我有一个位于varnish文件夹中的default.vcl和params来帮助调试问题。
答案 0 :(得分:-1)
您必须通过'service''启用'varnish才能自动启动并重启。
$sudo service varnish enable