I am running HAProxy version 1.5-dev16 to load balance traffic to a pair of web 
servers. That part of the service is running great. I attempted to add a proxy 
to serve the HTTP statistics page and am receiving "503 Service Unavailable" 
messages. (I also run a separate instance of HAProxy version 1.4.8 on which the 
statistics page is working fine.) I have tried several different 
configurations. Here is what gets logged when I attempt to access the 
statistics page. 



Feb 20 11:23:14 localhost haproxy[9350]: 1.2.3.4:54080 
[20/Feb/2014:11:23:14.616] adminstats adminstats/<NOSRV> 1/-1/-1/-1/+1 503 +212 
SC-- 15/0/0/0/0 0/0 "GET /haproxy_stats HTTP/1.1" 


Feb 20 11:23:14 localhost haproxy[9350]: 1.2.3.4:54081 
[20/Feb/2014:11:23:14.867] adminstats adminstats/<NOSRV> 0/-1/-1/-1/+0 503 +212 
SC-- 22/0/0/0/0 0/0 "GET /favicon.ico HTTP/1.1" 


After adding the listen section for the HTTP statistics proxy I reloaded 
HAProxy using the "-sf" argument rather than doing a cold start. (I wanted to 
mention that in case it makes a difference somehow.) 


Below is my current configuration. I suspect it is something in my 
configuration which is causing the problem but I am stumped. Any help would be 
appreciated. 


global 
log 127.0.0.1 local0 
log 127.0.0.1 local1 notice 
maxconn 8192 
user haproxy 
group haproxy 
daemon 
spread-checks 5 
stats socket /var/run/haproxy/haproxy.sock mode 0600 level admin 


defaults 
mode http 
log global 
option httplog 
option dontlognull 
option logasap 
retries 3 
option redispatch 
maxconn 8192 
timeout connect 30000 
timeout client 30000 
timeout server 30000 
option contstats 


frontend https-in 
option httplog 
option httpclose 
option forwardfor 
reqadd X-Forwarded-Proto:\ https 


bind 1.2.3.4:443,5.6.7.8:443 ssl crt /.../cert.pem ca-file /.../bundle.pem 


default_backend servers 


frontend http-in 
option httplog 
option httpclose 
option forwardfor 
reqadd X-Forwarded-Proto:\ http 


bind 1.2.3.4:80,5.6.7.8:80 


default_backend servers 


backend servers 
option httpchk 
option httplog 
option httpclose 
balance roundrobin # Load Balancing algorithm 
cookie COOKIE insert indirect nocache 


server one 9.10.11.12:80 cookie ONE weight 10 maxconn 1024 check 
server two 9.10.11.13:80 cookie TWO weight 10 maxconn 1024 check 
server three 9.10.11.14:80 cookie THREE weight 0 maxconn 1024 check disabled 


listen adminstats 0.0.0.0:8080 
mode http 
balance 
timeout client 5000 
timeout connect 4000 
timeout server 30000 
stats uri /haproxy_stats 
stats realm HAProxy\ Statistics 
stats auth user:password 






-- 

patrick 

Patrick Landry 
University of Louisiana at Lafayette 
Director, University Computer Support Services 

Reply via email to