Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
10-28-2015, 12:14 PM
#1
LQ Newbie
Registered: Oct 2015
Posts: 22
Rep:
Keepalived backup keeps becoming master
I am using a rhel 7 machine with 2 nics, one internal and one external.
For some reason even though the machines are receiving the vrrp packets, seemingly properly, the backup is not recognizing the master is back online.
Here is my backup's relevant conf code
Code:
global_defs {
notification_email {
xxx@xxx
}
notification_email_from xxx@xxx
smtp_server localhost
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 2
weight 2
}
vrrp_instance VI_2 {
state BACKUP
interface eno33559296
virtual_router_id 52
priority 100
smpt_alert
advert_int 1
authentication {
auth_type PASS
auth_pass xxxxxxxxxxxxx
}
virtual_ipaddress {
10.76.10.100/24 brd 10.76.10.255
}
track_script {
chk_haproxy
}
}
static_routes{
192.168.136.0/24 dev eno16780032 tab 1
10.76.10.0/24 dev eno33559296 tab 2
default via 192.168.136.1 dev eno16780032 tab 1
add default via 10.76.10.1 dev eno33559296 tab 2
add from 192.168.136.184/32 tab 1 priority 100
add from 10.76.10.100/32 tab 2 priority 300
}
virtual_server 10.76.10.100 3306 {
delay_loop 6
lb_kind NAT
persistence_timeout 50
protocol TCP
real_server 10.76.10.101 3306 {
weight 1
}
real_server 10.76.10.102 3306 {
weight 1
}
real_server 10.76.10.103 3306 {
weight 1
}
Here is the tcpdump showing that the machines seem to be seeing each other with the alternating priorities.
Code:
13:03:42.791859 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 152, authtype simple, intvl 1s, length 20
13:03:42.858678 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 102, authtype simple, intvl 1s, length 20
13:03:43.792423 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 152, authtype simple, intvl 1s, length 20
13:03:43.859558 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 102, authtype simple, intvl 1s, length 20
13:03:44.792915 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 152, authtype simple, intvl 1s, length 20
13:03:44.860401 IP mysqlclmgmt > vrrp.mcast.net: VRRPv2, Advertisement, vrid 52, prio 102, authtype simple, intvl 1s, length 20
And here is the log output
Code:
Oct 28 12:59:10 lvs2 systemd: Starting LVS and VRRP High Availability Monitor...
Oct 28 12:59:10 lvs2 Keepalived[17087]: Starting Keepalived v1.2.13 (11/18,2014)
Oct 28 12:59:10 lvs2 systemd: Started LVS and VRRP High Availability Monitor.
Oct 28 12:59:10 lvs2 Keepalived[17088]: Starting Healthcheck child process, pid=17089
Oct 28 12:59:10 lvs2 Keepalived[17088]: Starting VRRP child process, pid=17090
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP 192.168.136.184 added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP fe80::250:56ff:fea8:77d added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP fe80::250:56ff:fea8:539a added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering Kernel netlink reflector
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering Kernel netlink command channel
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering gratuitous ARP shared channel
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP 192.68.136.184 added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP fe80::250:56ff:fea8:77d added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP fe80::250:56ff:fea8:539a added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Registering Kernel netlink reflector
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Registering Kernel netlink command channel
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Opening file '/etc/keepalived/keepalived.conf'.
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Configuration is using : 65505 Bytes
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< Global definitions >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Router ID = LVS_DEVEL
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Smtp server = 0.0.0.0
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Smtp server connection timeout = 30
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Email notification from =
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Email notification =
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP IPv4 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP IPv6 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: SNMP Trap disabled
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Opening file '/etc/keepalived/keepalived.conf'.
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Configuration is using : 13316 Bytes
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< VRRP Topology >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP Instance = VI_2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Want State = BACKUP
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Runing on device = eno33559296
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Virtual Router ID = 52
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Priority = 100
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Advert interval = 1sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Authentication type = SIMPLE_PASSWORD
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Password = 1111
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Tracked scripts = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: chk_haproxy weight 2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Virtual IP = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: 10.76.10.100/24 brd 10.76.10.255 dev eno33559296 scope global
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< VRRP Scripts >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP Script = chk_haproxy
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Command = killall -0 haproxy
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Interval = 2 sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Timeout = 0 sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Weight = 2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Rise = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Fall = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Status = INIT
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Using LinkWatch kernel netlink reflector...
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Entering BACKUP STATE
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP sockpool: [ifindex(3), proto(112), unicast(0), fd(10,11)]
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: Scheduler or persistence engine not found
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: No such file or directory
Oct 28 12:59:10 lvs2 systemd: Starting LVS and VRRP High Availability Monitor...
Oct 28 12:59:10 lvs2 Keepalived[17087]: Starting Keepalived v1.2.13 (11/18,2014)
Oct 28 12:59:10 lvs2 systemd: Started LVS and VRRP High Availability Monitor.
Oct 28 12:59:10 lvs2 Keepalived[17088]: Starting Healthcheck child process, pid=17089
Oct 28 12:59:10 lvs2 Keepalived[17088]: Starting VRRP child process, pid=17090
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP 192.68.136.184 added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP fe80::250:56ff:fea8:77d added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Netlink reflector reports IP fe80::250:56ff:fea8:539a added
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering Kernel netlink reflector
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering Kernel netlink command channel
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Registering gratuitous ARP shared channel
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP 192.68.136.184 added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP fe80::250:56ff:fea8:77d added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP fe80::250:56ff:fea8:539a added
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Registering Kernel netlink reflector
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Registering Kernel netlink command channel
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Opening file '/etc/keepalived/keepalived.conf'.
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Configuration is using : 65505 Bytes
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< Global definitions >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Router ID = LVS_DEVEL
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Smtp server = 0.0.0.0
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Smtp server connection timeout = 30
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Email notification from =
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Email notification =
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP IPv4 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP IPv6 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: SNMP Trap disabled
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Opening file '/etc/keepalived/keepalived.conf'.
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Configuration is using : 13316 Bytes
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< VRRP Topology >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP Instance = VI_2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Want State = BACKUP
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Runing on device = eno33559296
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Virtual Router ID = 52
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Priority = 100
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Advert interval = 1sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Authentication type = SIMPLE_PASSWORD
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Password = 1111
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Tracked scripts = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: chk_haproxy weight 2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Virtual IP = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: 10.76.10.100/24 brd 10.76.10.255 dev eno33559296 scope global
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: ------< VRRP Scripts >------
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP Script = chk_haproxy
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Command = killall -0 haproxy
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Interval = 2 sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Timeout = 0 sec
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Weight = 2
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Rise = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Fall = 1
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Status = INIT
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: Using LinkWatch kernel netlink reflector...
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Entering BACKUP STATE
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP sockpool: [ifindex(3), proto(112), unicast(0), fd(10,11)]
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: Scheduler or persistence engine not found
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: No such file or directory
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: No such file or directory
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: No such file or directory
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: ------< Global definitions >------
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Router ID = LVS_DEVEL
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Smtp server = 0.0.0.0
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Smtp server connection timeout = 30
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Email notification from =
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Email notification =
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: VRRP IPv4 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 kernel: IPVS: Scheduler module ip_vs_ not found
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: VRRP IPv6 mcast group = 224.0.0.18
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: SNMP Trap disabled
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: ------< SSL definitions >------
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Using autogen SSL context
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: ------< LVS Topology >------
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: System is compiled with LVS v1.2.1
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: VIP = 10.76.10.100, VPORT = 3306
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: delay_loop = 6, lb_algo =
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: persistence timeout = 50
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: protocol = TCP
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: alpha is OFF, omega is OFF
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: quorum = 1, hysteresis = 0
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: lb_kind = NAT
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: RIP = 10.76.10.101, RPORT = 3306, WEIGHT = 1
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: RIP = 10.76.10.102, RPORT = 3306, WEIGHT = 1
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: RIP = 10.76.10.103, RPORT = 3306, WEIGHT = 1
Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: Using LinkWatch kernel netlink reflector...
Oct 28 12:59:10 lvs2 Keepalived_vrrp[17090]: VRRP_Script(chk_haproxy) succeeded
Oct 28 12:59:11 lvs2 ntpd[2852]: Deleting interface #69 eno33559296, 10.76.10.100#123, interface stats: received=0, sent=0, dropped=0, active_time=391 secs
Oct 28 12:59:13 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Transition to MASTER STATE
Oct 28 12:59:14 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Entering MASTER STATE
Oct 28 12:59:14 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) setting protocol VIPs.
Oct 28 12:59:14 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Sending gratuitous ARPs on eno33559296 for 10.76.10.100
Oct 28 12:59:14 lvs2 avahi-daemon[696]: Joining mDNS multicast group on interface eno33559296.IPv4 with address 10.76.10.100.
Oct 28 12:59:14 lvs2 avahi-daemon[696]: New relevant interface eno33559296.IPv4 for mDNS.
Oct 28 12:59:14 lvs2 avahi-daemon[696]: Registering new address record for 10.76.10.100 on eno33559296.IPv4.
Oct 28 12:59:14 lvs2 Keepalived_healthcheckers[17089]: Netlink reflector reports IP 10.76.10.100 added
Oct 28 12:59:15 lvs2 ntpd[2852]: Listen normally on 70 eno33559296 10.76.10.100 UDP 123
Oct 28 12:59:19 lvs2 Keepalived_vrrp[17090]: VRRP_Instance(VI_2) Sending gratuitous ARPs on eno33559296 for 10.76.10.100
Any help would be greatly appreciated.
10-29-2015, 02:42 PM
#2
Senior Member
Registered: Apr 2009
Posts: 1,853
Rep:
Health checking, Oct 28 12:59:10 lvs2 Keepalived_healthcheckers[17089]: IPVS: Scheduler or persistence engine not found, is failure. You should upgrade to 7.1.
Check following bug fix.
https://bugzilla.redhat.com/show_bug.cgi?id=1261389
10-29-2015, 03:54 PM
#3
LQ Newbie
Registered: Oct 2015
Posts: 22
Original Poster
Rep:
Quote:
Originally Posted by
nini09
Thank you for responding. I am already on 7.1, I figured out that problem, it was that the secondary nic did not have an IP address already and so it seemed to fail. With another IP assigned it works, however then mysql connections fail with:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 "Internal error/check (Not system error)"
All times are GMT -5. The time now is 02:54 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News