在使用haproxy配置三台web服务器使用web server负载均衡时,健康检查一直失败,监控down状态,服务无法注册。相关信息如下,求大神帮忙看下。
- springboot project web服务器
- HA-Proxy version 1.5.18 2016/05/10
- 如下健康检查配置的 URL均可以正常访问。
- 192.168.40.128:9090/index.html
- 192.168.40.129:9090/index.html
- 192.168.40.130:9090/index.html
...
# 打开监控
stats uri /status
stats auth admin:admin
stats refresh 30s
stats show-node
stats show-legends
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend main *:9000
default_backend web_server
#--------------------------------------------------------------------
# backend web_server
#---------------------------------------------------------------------
backend web_server
mode http
cookie appsrv insert nocache
balance roundrobin
option forwardfor
#option http-server-close
option httpchk GET /index.html
#option httpchk HEAD /index.html HTTP/1.0
#http-check expect status 200
#option httpchk HEAD /index.html HTTP/1.1
server server1 192.168.40.128:9090 cookie server1 check inter 5000 rise 2 fall 5
server server2 192.168.40.129:9090 cookie server2 check inter 5000 rise 2 fall 5
server server3 192.168.40.130:9090 cookie server3 check inter 5000 rise 2 fall 5