Re: Need help troubleshooting a keepalived problem

Sander Klein <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
Hi,

this is in no way a keepalived error. It is an config error in haproxy. 
If you configure haproxy to listen on 192.168.116.101 it will *never* 
listen on 192.168.116.100.

When you configure haproxy to listen on 0.0.0.0 you tell it to listen on 
any ip that pops up on the servers.

Keepalived only manages the VIP, not any service that should listen on 
the VIP. That is the responsibility of the service.

Sander

On 2015-10-16 16:19, Gage, Ronald R wrote:
> Resolved.
> 
> I had haproxy listening specifically on a single address:
> 192.168.116.101:3306.  This apparently was enough to throw off
> keepalived.  Changing the listen address in haproxy to 0.0.0.0:3306
> and it now works.
> 
> Ron
> 
> FROM: Gage, Ronald R [mailto:[email protected]]
> SENT: Friday, October 16, 2015 9:29 AM
> TO: [email protected]
> SUBJECT: [Keepalived-devel] Need help troubleshooting a keepalived
> problem
> 
> Hi Everyone!
> 
> Is this the best place to go for discussing a problem I am having with
> Keepalived?
> 
> The problem: The VIP is not recreating all the ports on the monitored
> host.  In this case: an HAProxy driven MySQL instance.
> 
> System layout:
> 
> 2 x 'load balancer' machines running both haproxy (load balancer) and
> keepalived (high availability).  The idea being that keepalived will
> switch between haproxy hosts in the event of failure.
> 
> Haproxy is working correctly and balancing between a small cluster of
> MySQL hosts.  That part is working as expected.  The keepalived VIP
> however is not recreating the MySQL TCP port on the VIP.
> 
> _C:\Users\rgage>nmap 192.168.116.101_
> 
> _ _
> 
> _Starting Nmap 6.49BETA5 ( https://nmap.org ) at 2015-10-16 09:25
> Eastern Dayligh_
> 
> _t Time_
> 
> _Nmap scan report for 192.168.116.101_
> 
> _Host is up (0.0030s latency)._
> 
> _Not shown: 997 closed ports_
> 
> _PORT     STATE SERVICE_
> 
> _22/tcp   open  ssh_
> 
> _80/tcp   open  http_
> 
> _3306/tcp open  mysql_
> 
> _ _
> 
> _Nmap done: 1 IP address (1 host up) scanned in 0.76 seconds_
> 
> _ _
> 
> _C:\Users\rgage>nmap 192.168.116.100_
> 
> _ _
> 
> _Starting Nmap 6.49BETA5 ( https://nmap.org ) at 2015-10-16 09:25
> Eastern Dayligh_
> 
> _t Time_
> 
> _Nmap scan report for 192.168.116.100_
> 
> _Host is up (0.0032s latency)._
> 
> _Not shown: 998 closed ports_
> 
> _PORT   STATE SERVICE_
> 
> _22/tcp open  ssh_
> 
> _80/tcp open  http_
> 
> _ _
> 
> _Nmap done: 1 IP address (1 host up) scanned in 0.73 seconds_
> 
> _ _
> 
> .101 is one of the haproxy/keepalived machines and .100 is the VIP
> 
> What should I be looking for to fix this?
> 
> The config:
> 
> _vrrp_instance VI_1 {_
> 
> _    state MASTER_
> 
> _    interface ens160_
> 
> _    virtual_router_id 99_
> 
> _    priority 201_
> 
> _    advert_int 1_
> 
> _    virtual_ipaddress {_
> 
> _        192.168.116.100_
> 
> _    }_
> 
> _    track_script {_
> 
> _        chk_haproxy_
> 
> _    }_
> 
> _    authentication {_
> 
> _        auth_type PASS_
> 
> _        auth_pass e…._
> 
> _    }_
> 
> _}_
> 
> _vrrp_script chk_haproxy {           # Requires keepalived-1.1.13_
> 
> _        script "killall -0 haproxy"     # cheaper than pidof_
> 
> _        interval 2                      # check every 2 seconds_
> 
> _        weight 2                        # add 2 points of prio if OK_
> 
> 
> _}_
> 
> Ron
> 
> ***********************************************************************************************************************
> 
> 
> This email message and any attachments are intended solely for the use
> of the addressee. If you are not the intended recipient, you are
> prohibited from reading, disclosing, reproducing, distributing,
> disseminating or otherwise using this transmission. If you have
> received this message in error, please promptly notify the sender by
> reply email and immediately delete this message from your system. This
> message and any attachments may contain information that is
> confidential, privileged or exempt from disclosure. Delivery of this
> message to any person other than the intended recipient is not
> intended to waive any right or privilege. Message transmission is not
> guaranteed to be secure or free of software viruses.
> ***********************************************************************************************************************
> 
> 
> ***********************************************************************************************************************
> 
> 
> This email message and any attachments are intended solely for the use
> of the addressee. If you are not the intended recipient, you are
> prohibited from reading, disclosing, reproducing, distributing,
> disseminating or otherwise using this transmission. If you have
> received this message in error, please promptly notify the sender by
> reply email and immediately delete this message from your system. This
> message and any attachments may contain information that is
> confidential, privileged or exempt from disclosure. Delivery of this
> message to any person other than the intended recipient is not
> intended to waive any right or privilege. Message transmission is not
> guaranteed to be secure or free of software viruses.
> ***********************************************************************************************************************
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Keepalived-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/keepalived-devel

------------------------------------------------------------------------------
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.