haproxy service fails to start with "cannot bind socket"

Solution Verified - Updated -

Issue

  • haproxy service fails to start with cannot bind socket
  • The following appears in the messages file or systemctl journal:
haproxy[PID]: [ALERT] : Starting frontend httpweb: cannot bind socket [x.x.x.x:80]
systemd[1]: haproxy.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: haproxy.service: Failed with result 'exit-code'.

Environment

  • Red Hat Enterprise Linux 7 and above
  • keepalived managing virtual shared IP (VIP) with VRRP
  • haproxy binding to VIP

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content