0

I am trying to configure haproxy with keepalived but if I start keepalived service first, haproxy fails to start. When keepalived service is stopped, haproxy starts without any problems. I get the error below when I attempt to start haproxy manually while keepalived is running: Proxy ‘webserver’: unable to find local peer ‘VIP01.domain.com’ in peers section ‘mypeer’. Fatal errors found in configuration. Control process exited, code=exited status=1 Failed with result ‘exit-code’. Failed to start HAProxy Load Balancer.

The system is Centos 8 and I found the article below and checked if net.ipv4.ip_nonlocal_bind sysctl is set to 1 but it still doesn’t start when keepalived is running. https://cbonte.github.io/haproxy-dconv/1.8/management.html#11

I would greatly appreciate any help.

3
  • What's the output of sudo haproxy -f /etc/haproxy/haproxy.cfg -c command?
    – maar
    Jul 13, 2020 at 10:38
  • This is the output: Proxy ‘webserver’: unable to find local peer ‘VIP01.domain.com’ in peers section ‘mypeer’. Fatal errors found in configuration. Control process exited, code=exited status=1 Failed with result ‘exit-code’. Failed to start HAProxy Load Balancer.
    – VS_777
    Jul 14, 2020 at 2:25
  • but if I stop keepalived service, the output is this: Configuration file is valid
    – VS_777
    Jul 14, 2020 at 2:27

0

You must log in to answer this question.

Browse other questions tagged .