Haproxy & keepalived (chk_haproxy) problem

Hi.
I want to set haproxy & keepalived system and testing failover between 2 servers.
keepalived setting chk_haproxy and if haproxy down, I hope failover.

vrrp_script chk_haproxy {
script “systemctl is-active haproxy”
}

Starting keepalived first.
Haproxy is not starting , so failover start…

But haproxy cannot start before starting keepalived.
Because keepalived have VIP settings, so haproxy bind VIP fail…

I want to start haproxy before keepalived starting in MASTER server.
Thanks for any help.

Hi,
If you are not binding on “*”, you can add the “transparent” option to your bind:
https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#5.1-transparent

2 Likes

thank you for reply!

I will try “transparent” option !