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:
...
- 1,704
10
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 ...
- 201
9
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 ...
- 630
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 ...
- 14.4k
8
votes
HAproxy 503 Service Unavailable No server is available to handle this request
Problem is in your HAProxy configuration. When I remove all comments from your config, I will get this:
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/...
- 2,633
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 ...
- 170
7
votes
View Current State of Keepalived
Reading the current status through SNMP has proven the most reliable for me.
To enable this you have to start keepalived with snmp support:
add -x to the deamon options (see /etc/sysconfig/...
- 225
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....
- 366
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 ...
- 618
6
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:...
- 323
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 ...
- 61
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 ...
- 253
5
votes
Accepted
HAProxy + keepalived + multiple backend farms / virtual IP addresses
Yes, HAproxy will do that. You'll just need to configure keepalived with all of the virtual IPs that HAproxy will use. You can assign multiple IPs in the virtual_ipaddress block in keepalived.conf:
...
- 2,627
5
votes
Accepted
Softlayer HAProxy with failover
I managed to get this set up, and here's how I did it:
I created a global IP address using SoftLayer's control panel.
I have Debian 7 on both HAProxy virtual servers. I added the global IP address to ...
- 22
5
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.
- 151
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
...
- 51
5
votes
Accepted
VIP not dropping from backup keepalived
VRRP communication between routers uses multicast IP address 224.0.0.18[1] and IP protocol number 112[2].
Thus, you only need to allow incoming and outgoing traffic with these specific parameters for ...
- 96
5
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 ...
5
votes
KeepAlived on different subnets
Unfortunately keepalived is using VRRP which works only within a single subnet.
- 149
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.
- 151
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 ...
- 738
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:
- 181
4
votes
keepalived VRRP_script not failing over
I've had the same issue - two CentOS 7.1 servers with track_script, and failing the vrrp_script on the MASTER would only result in the lone log message "VRRP_Script(chk_script) failed", not in a ...
3
votes
Keepalived disconnects
We have a similar setup, but using kamailio instead of haproxy. Anyway, we were seeing messages like that, so we change the way we were performing the checks (our checks have nothing to do with yours, ...
- 246
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 ...
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 ...
- 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 ~]# ...
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 ...
- 31
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 "...
- 630
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 ...
- 630
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
keepalived × 236high-availability × 53
haproxy × 46
linux × 44
load-balancing × 38
vrrp × 30
failover × 25
lvs × 19
networking × 15
linux-networking × 12
virtual-ip × 10
nginx × 9
amazon-web-services × 9
amazon-ec2 × 9
centos × 8
mysql × 8
redhat × 8
centos7 × 7
cluster × 7
debian × 6
failovercluster × 6
iptables × 5
galera × 5
ipvs × 5
ip × 4