小编Mic*_*ten的帖子

检查失败后 HAProxy 无法恢复

全部,

我遇到了 HAProxy 在后端服务器重新启动后无法恢复的问题。我没有使用代理进行负载平衡,而是将不同的 URL 定向到不同的服务器(Web 和 Web 服务)以避免跨域问题。代理工作正常,直到第一次检查失败,但一旦备份,HAProxy 就永远不会恢复转发到它。代理在 docker 容器 ( https://registry.hub.docker.com/u/dockerfile/haproxy/dockerfile/ ) 内运行,并且应该运行 HAProxy 1.5.3。

haproxy.cfg

global
    log         127.0.0.1 local0
    log         127.0.0.1 local1 notice
    user        haproxy
    group       haproxy

defaults
    mode        http
    log         global
    option      dontlognull
    option      httpclose
    option      httplog
    option      forwardfor
    option      persist
    option      redispatch
    option      http-server-close
    contimeout 5000
    clitimeout 50000
    srvtimeout 50000
    maxconn     60000
    retries     3
    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 …
Run Code Online (Sandbox Code Playgroud)

proxy haproxy docker

5
推荐指数
1
解决办法
8496
查看次数

标签 统计

docker ×1

haproxy ×1

proxy ×1