重启haproxy(提示后端上游服务器没有开启)
[root@localhost vagrant]# cat /var/log/haproxy.log
Jun 7 09:46:23 localhost haproxy[2479]: Proxy main started.
Jun 7 09:46:23 localhost haproxy[2479]: Proxy static started.
Jun 7 09:46:23 localhost haproxy[2479]: Proxy app started.
Jun 7 09:46:23 localhost haproxy[2479]: Server static/static is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Jun 7 09:46:23 localhost haproxy[2479]: backend static has no server available!
Jun 7 09:46:24 localhost haproxy[2480]: Server app/app1 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 3 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Jun 7 09:46:24 localhost haproxy[2480]: Server app/app2 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Jun 7 09:46:24 localhost haproxy[2480]: Server app/app3 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Jun 7 09:46:25 localhost haproxy[2480]: Server app/app4 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Jun 7 09:46:25 localhost haproxy[2480]: backend app has no server available!
Note:
如果你是自行编译安装haproxy的话,有时候可能会自定义日志文件在编译目录下面,但是rsyslog并没有读取该目录的权限,所以只能呵呵了~,不过办法总归是有的,就是折腾。。。