14 votes

keepalived VRRP_script not failing over

I had exactly the same issue however my problem was not in the firewall nor in my Ethernet adapter but in the "weight" settings of the check script. This was my configuration: MASTER: ...
giomanda's user avatar
  • 1,844
12 votes

View Current State of Keepalived

Dumping current state can be done by sending USR2 signal to keepalived parent process: kill -USR2 $(cat /var/run/keepalived.pid) Look inside file /tmp/keepalived.stats. Here are examples of the ...
SergA's user avatar
  • 221
10 votes
Accepted

Keepalived send gratuitous ARP periodically

keepalived versions 1.2.20 and above support following config settings regarding gratuitous ARP, vrrp_garp_master_refresh is what I need. # delay for second set of gratuitous ARPs after ...
user373333's user avatar
8 votes

Is it not possible to use keepalived in EC2

Update 2021. You can use it. But you probably shouldn't. There is very little justification to do so now. The Elastic Load Balancer should do most of what most people would need. The accepted ...
hookenz's user avatar
  • 14.6k
7 votes

How to configure Failover IPs for High Availability with Hetzner Online

As this is an old answer I'm not sure if you are still looking for an answer. But I stumbled upon it looking for the best way on how to do this. The way Hetzner assigns a failover IP to a dedicated ...
Robbert's user avatar
  • 170
7 votes
Accepted

Keepalived router on virtual ip is not reachable

I guess that ip addr show | grep global will show that your virtual address is 192.168.0.3/32 /32 is usually not the desired result, therefore you should add e.g. /24: virtual_ipaddress { 192....
Tom's user avatar
  • 396
7 votes

View Current State of Keepalived

If you issue the command: journalctl -u keepalived it has the state listed: Jul 12 13:45:52 vmt007 Keepalived_vrrp[14335]: VRRP_Instance(VI_INT) Entering MASTER STATE on the slave side you can see:...
eeijlar's user avatar
  • 333
7 votes
Accepted

keepalived doesn't detect loss of virtual IP

We experienced this issue and decided it is an issue with systemd-networkd in ubuntu 18.04 now using netplan. A newer version of keepalived should fix this as it can detect the removal of the ...
mp3foley's user avatar
  • 618
6 votes

View Current State of Keepalived

DBus With version 1.3.0, Keepalived added a DBus interface† to query the VRRP state, monitor VRRP events using signals and even modify some VRRP configuration at runtime. As of 2021, the interface is ...
Sebastian Schrader's user avatar
6 votes

Both servers running keepalived become master and have a same Virtual IP

For my case I had to allow multicast traffic through the firewall to 224.0.0.18, for ufw: ufw allow from 224.0.0.18 ufw allow to 224.0.0.18 This helped me.
joshweir's user avatar
  • 161
6 votes

keepalived BACKUP transitions to MASTER for no apparent reason

I came across this question while researching a similar behaviour so I thought I'd post the answer for the benefit of anyone else who is similarly puzzled. Both config files need to use the same ...
Gary Bilkus's user avatar
6 votes
Accepted

Start keepalived without IP on interface?

The new version of keepalived 2.0.5 was released today and it supports interfaces that do not exist yet. By happenstance that also fixes my issue as keepalived will start in a FAULT state if the ...
Paul's user avatar
  • 253
5 votes

How to use Docker with HAProxy+Keepalived?

You may need to enable non-local binding on the docker host. Add net.ipv4.ip_nonlocal_bind=1 to the end of the /etc/sysctl.conf file and force a reload of the file with the sudo sysctl -p command.
Dave's user avatar
  • 151
5 votes

KeepAlived on different subnets

Unfortunately keepalived is using VRRP which works only within a single subnet.
Bernard's user avatar
  • 149
5 votes

keepalived - random re-elections

The problem is that you use the default state MASTER for the backup nodes. They should state BACKUP. vrrp_instance VIP_61 { interface bond0 virtual_router_id 61 state BACKUP ...
pj3s's user avatar
  • 51
5 votes

keepalived doesn't detect loss of virtual IP

This issue is fixed in keepalived 2.0.0 from 2018-05-26, see changelog of keepalived Monitor VIP/eVIP deletion and transition to backup if a VIP/eVIP is removed unloes it is configured with ...
teissler's user avatar
  • 758
4 votes

HAproxy 503 Service Unavailable No server is available to handle this request

I got a similar error because HAProxy thought my backend was down due to the default health check it does. I disabled the health check and the 503 went away. I'm using pfsense GUI:
Charlie's user avatar
  • 181
4 votes

How to set up tcp check with keepalived?

If you do not need load balancing, track scripts offer failover based on checks run against your service. First, add a vrrp_script block before your vrrp_instance: global_defs { ...
talarczykco's user avatar
4 votes
Accepted

Keepalived going split brain when Firewalld is running

I've this morning figured out what the cause of the issue was, in case this helps somebody at a future date. I enabled LogDenied=all in /etc/firewalld/firewalld.conf, and was then able to identify ...
motorleague's user avatar
3 votes

Both servers running keepalived become master and have a same Virtual IP

In my case, for CentOS/RHEL 8 I only had to allow firewall rich-rule for vrrp protocol for solving this Keepalived split-brain issue where both the servers held the VIP IP address. I had to add sysctl ...
Parth Patel's user avatar
3 votes

Both servers running keepalived become master and have a same Virtual IP

I just came here looking for help with the same issue but none of the other answers helped. I have tracked down my issue though, so will leave it here for future web searchers. The scenario you are ...
Dan's user avatar
  • 131
3 votes
Accepted

Keepalived: multicast vs unicast

Q1. I wonder if multiply VRRP routers can flood the network with multicast advertisement and cause some performance issue? Would you recommend to use unicast in this case? No sane amount of VRRP ...
Aristarkh Zagorodnikov's user avatar
3 votes

View Current State of Keepalived

Using the following command sudo kill -s $(keepalived --signum=DATA) $(cat /var/run/keepalived.pid) cat /tmp/keepalived.data You will find State = MASTER or State = BACKUP
Andy Wang's user avatar
  • 131
3 votes

Keepalived notify script isn't executed

I had this same issue too, my notify script wasn't being executed, at the end of the day, I realized SELinux was blocking my script from being run, I found this out by typing: [root@server ~]# ...
Oluwaleke Aina's user avatar
3 votes
Accepted

Ubuntu 16.04, Keepalived VMAC

I have solved my own issue...for the curious, here's the blow-by-blow. First, make sure to carefully check your sysctls, as Ubuntu has some enabled by default you would not expect to be enabled by ...
Jason Keller's user avatar
3 votes
Accepted

keepalived: adjusting timeout for VRRP advert packets

You have to adjust "advert_int". Transit from the MASTER to the BACKUP is triggered when the BACKUP server doesn't recieve the VRRP advertisment from the MASTER for 3x the period defined in the "...
user373333's user avatar
3 votes
Accepted

Keepalived VIP is active on both servers

In what kind of environment are you running this keepalived instances? I've seen similar issues in environments that are not supporting multicast. Keepalived uses mulitcast for VRRP advertisements by ...
user373333's user avatar
3 votes

Why is keepalived running two MASTER nodes in my Sticky VIP configuration?

Single word answer: iptables. I was running two instances of keepalived - one to allow access from inside networks and the other to support external access. I copied the internal configuration to ...
Mark's user avatar
  • 131
3 votes
Accepted

keepalived: what are the `fo` and `mh` lvs scheduling algorithms?

The values allowed for virtual_server.lvs_sched are names of IPVS (IP Virtual Server) schedulers. The keepalived man page mentions rr|wrr|lc|wlc|lblc|sh|mh|dh|fo|ovf|lblcr|sed|nq as supported names ...
HBruijn's user avatar
  • 80.3k
3 votes

Something like VRRP/keepalived without MAC address impact? (RHEL 8)

Examples below assumes IPv4, with configuration similar to the basic Red Hat example here: a node with address 192.168.122.101/24, an other with 192.168.122.102/24, using VRRP instance VI_1 and VRRP ...
A.B's user avatar
  • 12.8k

Only top scored, non community-wiki answers of a minimum length are eligible