it is possible to configure keepalived so that only the master server are running an active service from haproxy?
Currently LB1 and LB2 (both with keepalived and haproxy) works great. But sometimes some requests is taken from LB2 (which is backup and the logs show it also) which results in an connection error in the browser
I deactivated haproxy on LB2 (service haproxy stop) and everything works fine. But now when LB1 goes down LB2 is going into master with an not started haproxy service.
I'm using Ubuntu Server 14.04.
The method is notify named. You have to put example in
keepalived.conf
(on both servers:And in the
notfiy-keepalived.sh
following code:Now keepalived will do the commands when its entering in one of the three states.