我在haproxy
上将1.7.5.2
从版本2.0.6-1~bpo9+1
升级到了debian
;相同的配置显示服务器关闭,日志显示以下错误:
“服务器健康检查失败,原因:第4层超时”
如果我从服务器上删除了“检查”选项,它会按预期运行,但是统计信息页面显示的服务器为灰色
配置文件:
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 50000
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
tune.ssl.default-dh-param 2048
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:D$
ssl-default-bind-options no-sslv3
defaults
mode http
log global
option httplog
option dontlognull
option log-health-checks
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
option forwardfor
retries 3
timeout http-request 60s
timeout queue 1m
timeout connect 60s
timeout client 10m
timeout server 10m
timeout http-keep-alive 60s
timeout check 60s
maxconn 30000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
listen HAProxyLocalStats
bind *:2267 name localstats
mode http
stats enable
stats refresh 10
stats admin if TRUE
stats uri /haproxy
stats auth admin:admin
timeout client 5000
timeout connect 5000
timeout server 5000
frontend FrontNginx
bind *:80
mode http
log global
capture request header X-Forwarded-For len 500
maxconn 30000
default_backend nginxFarm
#-----------------------------------------------------------------------
backend nginxFarm
mode http
balance leastconn
timeout connect 30000
retries 3
option forwardfor
server WEB01 10.20.10.19:80 check inter 5000
server WEB02 10.20.10.20:80 check inter 5000