LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-12-2018, 04:18 AM   #1
nejnej25
Member
 
Registered: Dec 2017
Location: Asia
Distribution: Slackware 14.2,CentOS 7
Posts: 110

Rep: Reputation: Disabled
Keepalived Problem: VIP not transferring to backup server


Hi, first of all here's some details.

Server1 running haproxy with keepalived (MASTER): CentOS 7
Server2 running haproxy with keepalived (BACKUP): CentOS 7

My problem is that whenever I stop haproxy the VIP is not transferring from master server to backup server.

Here is the configs:

MASTER:
Code:
vrrp_script chk_http_port {
        script "/usr/bin/killall -0 haproxy"
        interval 2
        weight 2
}

vrrp_instance VI_1 {
state MASTER
interface enp0s3 
virtual_router_id 51
priority 150
advert_int 1

authentication {
	auth_type PASS
	auth_pass 1111
}

unicast_src_ip 192.168.1.51   # IP address of local interface
    unicast_peer {            # IP address of peer interface
        192.168.1.52
}

track_script {
    chk_http_port
}

virtual_ipaddress {
	192.168.1.200/24 dev enp0s3
}
}
BACKUP:
Code:
vrrp_script chk_http_port {
        script "/usr/bin/killall -0 haproxy"
        interval 2
        weight 2
}


vrrp_instance VI_1 {
state BACKUP
interface enp0s3
virtual_router_id 51
priority 100
advert_int 1

authentication {
	auth_type PASS
	auth_pass 1111 
}

unicast_src_ip 192.168.1.52   # IP address of local interface
    unicast_peer {            # IP address of peer interface
        192.168.1.51
}

track_script {
    chk_http_port
}

virtual_ipaddress {
	192.168.1.200/24 dev enp0s3
}
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keepalived doesn't create VIP on external NIC horizn Linux - Networking 12 05-10-2016 03:32 PM
Keepalived backup keeps becoming master thaylin Linux - Networking 2 10-29-2015 04:54 PM
Keepalived + ipvsadm showing connections for both master and backup VRRP campi01 Linux - Networking 3 11-11-2013 06:16 AM
shorewwall forwad public vip to private vip on same box shorif2000 Linux - Networking 0 06-08-2011 08:51 AM
Keepalived redirect public vip to private vip shorif2000 Linux - Networking 1 06-07-2011 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration