大网数据广告活动
服务器运维问答

haproxy 503 no server available to handle this request

· 52CE 我爱测

I'm new to HAproxy and have been following guides to get me started. I think I got the set up I need but when I try to load my web site domain I get a 503 Service Unavailable No server is available to handle this request. this is…

问题原文

原帖链接 · Eli · CC BY-SA 3.0

I'm new to HAproxy and have been following guides to get me started. I think I got the set up I need but when I try to load my web site domain I get a

503 Service Unavailable

No server is available to handle this request.

this is my HAproxy set up:

global
    log 127.0.0.1   local0
    log 127.0.0.1   local1 notice
    debug
    stats timeout 30s
    maxconn 4096

defaults
    log global
    option httplog
    option dontlognull
    mode http
    timeout connect 5000
    timeout client  50000
    timeout server  50000

frontend http-in
    bind *:80
    acl app0 hdr(host) -i mywebsite.com

    use_backend srvs_app0 if app0


backend srvs_app0
    mode http
    balance roundrobin
    option forwardfor
    option httpchk HEAD / HTTP/1.1\r\nHost:localhost
    server host0 10.10.104.41:1038 check


listen stats *:1936
    stats enable
    stats uri /
    stats hide-version
    stats auth someuser:password

I'm not sure what I'm looking for, or where I can start to look for a possible problem.

I'm looking for help in either pointing me on the right direction or maybe even point out a solution.

已采纳解答

原帖链接 · Tero Kilkanen · CC BY-SA 3.0

You have configured HAProxy to connect to 10.10.104.41 port 1038. The error message tells that it is unable to connect to this port.

The reason could be one of these:

  1. The app server at that IP / Port is not started.
  2. The firewall on that server is not allowing external connections.
  3. There is no route to the IP of the app server.
  4. The app server IP / Port is incorrect.

In order to give more precise instructions, details are needed on the structure of your setup and configuration of the app server.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。