清漆书:连接失败(localhost:1234):( null)

时间:2017-09-15 13:52:14

标签: varnish

Ubuntu 16.04

varnishd(清漆-4.1.8修订版d266ac5c6)

我正在读The Varnish书。

我做了这个练习: http://book.varnish-software.com/4.0/chapters/Getting_Started.html#exercise-configure-varnish

即:“请参阅表2并找到安装的Varnish配置文件。打开并编辑该文件以侦听端口80上的客户端请求,并在端口1234上具有管理接口”。

现在我有:

清漆

DAEMON_OPTS="-a :80 \
             -T localhost:1234 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -s malloc,256m"

default.vcl

vcl 4.0;

backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

然后我尽我所能在“运动:配置清漆”中做了必要的事。

至少,我已经重新开始了:

service varnish restart

我来到下一个练习: http://book.varnish-software.com/4.0/chapters/Getting_Started.html#vcl-reload

$ sudo service varnish reload
Job for varnish.service failed because the control process exited with error code. See "systemctl status varnish.service" and "journalctl -xe" for details.


$ systemctl status varnish.service
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/lib/systemd/system/varnish.service; disabled; vendor preset: enabled)
   Active: active (running) (Result: exit-code) since Пт 2017-09-15 16:31:56 MSK; 12min ago
  Process: 20980 ExecReload=/usr/share/varnish/reload-vcl (code=exited, status=1/FAILURE)
  Process: 20089 ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /
 Main PID: 20114 (varnishd)
    Tasks: 218
   Memory: 129.6M
      CPU: 614ms
   CGroup: /system.slice/varnish.service
           ├─20114 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varn
           └─20117 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varn

сен 15 16:33:05 michael-desktop systemd[1]: Reloading Varnish Cache, a high-performance HTTP accelerator.
сен 15 16:33:05 michael-desktop reload-vcl[20389]: Connection failed (localhost:1234): (null)
сен 15 16:33:05 michael-desktop reload-vcl[20389]: Error: vcl.load vcl_b5ad5589-cf76-4f2b-b14d-734d35b13e
сен 15 16:33:05 michael-desktop systemd[1]: varnish.service: Control process exited, code=exited status=1
сен 15 16:33:05 michael-desktop systemd[1]: Reload failed for Varnish Cache, a high-performance HTTP acce
сен 15 16:43:55 michael-desktop systemd[1]: Reloading Varnish Cache, a high-performance HTTP accelerator.
сен 15 16:43:55 michael-desktop reload-vcl[20980]: Connection failed (localhost:1234): (null)
сен 15 16:43:55 michael-desktop reload-vcl[20980]: Error: vcl.load vcl_38fbe034-b800-4315-af87-c90bf6fe3a
сен 15 16:43:55 michael-desktop systemd[1]: varnish.service: Control process exited, code=exited status=1
сен 15 16:43:55 michael-desktop systemd[1]: Reload failed for Varnish Cache, a high-performance HTTP acce
lines 1-23/23 (END)

好吧,连接失败(localhost:1234):( null) 但我似乎已经跟着这本书了。

当我手动尝试时:

$ varnishadm -T localhost:1234
Connection failed (localhost:1234): (null)

我检查了端口是否被占用:netstat -nlpt

该端口是免费的。

你能帮我一把吗?

0 个答案:

没有答案