03:27:41 # service haproxy restart
Stopping haproxy: [ OK ]
Starting haproxy: [WARNING] 218/032810 (8549) : parsing [/etc/haproxy/haproxy.cfg:22] : ‘log-format’ : format variable ‘r’ is reserved for HTTP mode.
[WARNING] 218/032810 (8549) : parsing [/etc/haproxy/haproxy.cfg:22] : ‘log-format’ : format variable ‘Tr’ is reserved for HTTP mode.
[WARNING] 218/032810 (8549) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
[ OK ] root@cernrdeckhaproxy101.cernerasp.com:~ ( cernrdeckhaproxy101.cernerasp.com )
03:28:10 #
Message from syslogd@localhost at Aug 6 03:28:10 …
haproxy[8549]: backend rundeck has no server available!
Message from syslogd@localhost at Aug 6 03:28:12 …
haproxy[8550]: backend mysql has no server available!
When i load the page i get 503 service unavailable. Any help will me much appreciated.
So since you worked on your backend servers, haproxy returns 503 messages and restarting haproxy unsurprisingly does not help.
Please start by actually sharing your haproxy configuration.
Most likely your haproxy health checks return negative results. It’s possible we need your to send Host headers or SNI to your backend, after the changes.
backend stats_interface
server local 0.0.0.0:8080
stats enable
stats uri /
stats realm Strictly\ Private
backend rundeck
server rdeckapp101.asp.com ip-address:4440 check observe layer4 error-limit 2 on-error mark-down
server rdeckapp102.asp.com ip-address:4440 check observe layer4 error-limit 2 on-error mark-down backup
balance source
mode http
stick-table type ip size 100k expire 24h peers rundeck_proxy
stick on src
option httpchk
backend mysql
server rdeckmsql101.asp.com ip-address:3306 check port 9200 inter 2000 rise 6 fall 3 downinter 5000
server rdeckmsql102.asp.com ip-address:3306 check port 9200 inter 2000 rise 6 fall 3 downinter 5000
server rdeckmsql103.asp.com ip-address:3306 check port 9200 inter 2000 rise 6 fall 3 downinter 5000
balance source
mode tcp
stick-table type ip size 100k expire 24h peers rundeck_proxy
stick on src
option httpchk
So neither the backend rundeck nor the backend mysql works and haproxy health check declares them down.
If you doubt haproxy health checks, capture the health check traffic and analyze it. But first, try if you can actually reach your backends from your box where haproxy runs: curl -vv http://ip-address:4440/ for the rundeck backend and curl -vv http://ip-address:9200/ for the mysql backend all from the same VM where haproxy runs.
There you go: your backend servers are not available. Either they refuse the connection (port 9200) or they answer with a 503 Service Unavailable response.