haproxy故障一:
[root@www.linuxyw.com conf]# service haproxy start
Starting HAProxy daemon: haproxy[ALERT] 163/152722 (30814) : parsing [/usr/local/haproxy/conf/haproxy.conf:26]: negation/default is not supported for option ‘splice-response’.
[ALERT] 163/152722 (30814) : Error(s) found in configuration file : /usr/local/haproxy/conf/haproxy.conf
[ALERT] 163/152722 (30814) : Fatal errors found in configuration.
解决方法:
注释掉splice-response
如:
no option splice-response
haproxy故障二:
127.0.0.1 haproxy[31795]: proxy www has no server available!
我出现的这个故障,是由配置文件健康检查时,指定检查的页面不存在造成的,只要修改一个存在的页面就OK了,或者自己建一个专用于健康检查的页面。
option httpchk HEAD /index.html HTTP/1.0
红色字体index.html是我用来健康检查的页面,当然这只是测试,生产环境中,一般新建个专用的页面用于健康检查。
haproxy故障三:
haproxy启动时提示失败:
[ALERT] 164/110030 (11606) : Starting proxy linuxyw.com: cannot bind socket
解决方法:
http://www.linuxyw.com/a/yunweiguzhang/20130614/570.html
Hapaxy故障四:
[root@activemq haproxy]# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg
[ALERT] 149/201728 (43826) : [/usr/local/haproxy/sbin/haproxy.main()] Cannot chroot(/usr/share/haproxy).
报错了,解决方法:
[root@db169 ~]# mkdir /usr/share/haproxy
正确情况:
[root@activemq haproxy]# mkdir /usr/share/haproxy
[root@activemq haproxy]# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg
[root@activemq haproxy]# ps -ef | grep haproxy
nobody 43852 1 0 20:21 ? 00:00:00 /usr/local/haproxy/sbin/haproxy -f
/usr/local/haproxy/haproxy.cfg
root 43855 42323 0 20:21 pts/2 00:00:00 grep haproxy