Skip to content

Troubleshooting

Fixes for the problems you are most likely to hit with HAProxy Community LTS. Each entry gives the symptom, the usual cause, and what to do.

Nothing answers on port 8080

Cause: first boot has not finished, or HAProxy failed to start.

Fix: check the services and their logs:

systemctl status sushi-haproxy-firstboot haproxy --no-pager
sudo journalctl -b -u sushi-haproxy-firstboot -u haproxy --no-pager

If first boot failed, retry it, then start HAProxy:

sudo systemctl restart sushi-haproxy-firstboot
sudo systemctl start haproxy

Requests return 503 after I change the backends

Cause: every server in backend sushi_app is failing its health check. The check calls GET /health and expects HTTP 200.

Fix: make sure your servers answer GET /health with 200, or change option httpchk to a path they do answer. Check that the security groups let the HAProxy instance reach them. The stats page shows the state of each server.

The stats page returns 401

Cause: the stats page needs HTTP basic auth, user pilot, and the request had no password or the wrong one.

Fix: use the password from /var/lib/haproxy/stats.password, as shown in Getting started. If you changed the stats auth line, use the password on that line.

/stats on port 8080 is refused

Cause: by design, the frontend refuses paths starting with /stats. The stats page is only on port 8404.

Fix: use http://127.0.0.1:8404/stats.

The reload fails

Cause: the configuration has an error. systemctl reload haproxy checks the file first and keeps the running configuration if the check fails.

Fix: run the check yourself to see the error:

sudo haproxy -c -f /etc/haproxy/haproxy.cfg

The walkthrough or self-test fails after I changed the configuration

Cause: both expect the default configuration and the two sample backends.

Fix: this is expected once you have made the instance your own. Use the stats page and the journal to check your own setup instead.