timeout - HAProxy 2.0.6-1~bpo9+1 服务器健康检查失败,原因:第四层超时
问题描述
我将haproxy
from version升级1.7.5.2
到2.0.6-1~bpo9+1
on debian
;相同的配置显示服务器关闭,日志显示以下错误:
“服务器健康检查失败,原因:Layer4 超时”
如果我从服务器中删除“检查”选项,它会按预期工作,但统计页面以灰色显示服务器
配置文件:
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
解决方案
推荐阅读
- xml - 使用 libxml2 和 xpath 在 XML 中查找和删除节点
- push-notification - 具有推送、短信、电子邮件、松弛等功能的云通知服务
- javascript - 如何比较两个对象数组以找出差异
- javascript - 在 React Native 中调用外部函数
- bash - 用脚本覆盖文件属性
- django - Django - Ajax 表单的问题
- css - 台式机和移动设备上的负边距不一样
- chatbot - 是否可以通过 Line Messaging API 删除群聊中的消息?
- mongodb - 使用 Mongoose 连接到 docker 环境中的 MongoCryptD 实例
- node.js - 如何在MongoDB中更有效、更高效地存储数据?