LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 03:18 AM   #1
nejnej25
Member
 
Registered: Dec 2017
Location: Asia
Distribution: Slackware 14.2,CentOS 7, Ubuntu, Debian
Posts: 116

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



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 02:32 PM
Keepalived backup keeps becoming master thaylin Linux - Networking 2 10-29-2015 03:54 PM
Keepalived + ipvsadm showing connections for both master and backup VRRP campi01 Linux - Networking 3 11-11-2013 05:16 AM
shorewwall forwad public vip to private vip on same box shorif2000 Linux - Networking 0 06-08-2011 07:51 AM
Keepalived redirect public vip to private vip shorif2000 Linux - Networking 1 06-07-2011 10:33 AM

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

All times are GMT -5. The time now is 12:56 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
Open Source Consulting | Domain Registration