Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-11-2010, 09:34 PM   #1
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Rep: Reputation: 15
Post heartbeat configuration for lb

hello LQ!

I am attempting to setup haproxy using a shared up I am trying to setup using the heartbeat package that I currently have installed:

  [root@VIRTCENT01:~]#rpm -qa | grep heartbeat | grep -v -e stonith -e pils
I am using CentOS 5.5:
[root@VIRTCENT01:~]#uname -a
Linux 2.6.18-194.26.1.el5.centos.plusxen #1 SMP Wed Nov 10 12:49:43 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
I have /etc/ha/.d authkeys setup this way:

auth 2
#1 crc
2 sha1 {SHA}secret
I have /etc/ha.d/resources setup like this:

And I have /etc/ setup like this:

 #       What UDP port to use for udp or ppp-udp communication?
udpport        694
bcast  eth0
mcast eth0 694 1 0
ucast eth0
#       What interfaces to heartbeat over?
udp     eth0
#       Facility to use for syslog()/logger (alternative to log/debugfile)
logfacility     local0
#       Tell what machines are in the cluster
#       node    nodename ...    -- must match uname -n
The service seems to start ok:

[root@VIRTCENT01:~]#service heartbeat restart
Stopping High-Availability services: 
                                                           [  OK  ]
Waiting to allow resource takeover to complete:
                                                           [  OK  ]
Starting High-Availability services: 
2010/12/11_22:03:55 INFO:  Resource is stopped
                                                          [  OK  ]
(tho I am unsure of that the INFO notice is of the resource being stopped).

And I have verified that it is running with ps:

[root@VIRTCENT01:~]#ps auxwww | grep heartbeat
root      3646  0.1  4.6  12260 12256 ?        SLs  22:03   0:00 heartbeat: master control process
nobody    3648  0.0  2.1   5664  5660 ?        SL   22:03   0:00 heartbeat: FIFO reader      
nobody    3649  0.0  2.1   5660  5656 ?        SL   22:03   0:00 heartbeat: write: bcast eth0
nobody    3650  0.0  2.1   5660  5656 ?        SL   22:03   0:00 heartbeat: read: bcast eth0 
root      3653  0.0  0.2  61180   736 pts/1    S+   22:04   0:00 grep heartbeat
And verified that the box is listening on port 694 (the port that I have set for heartbeat):

[root@VIRTCENT01:~]#netstat -tulpn | grep heartbeat
udp        0      0       *                               3649/heartbeat: wri 
udp        0      0     *                               3649/heartbeat: wri
However although I have the port enabled in iptables:

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 694 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
An nmap scan does not see anything active on 694:

bluethundr@bluethundr-laptop:~$ sudo nmap -sT -A virt1

Starting Nmap 5.00 ( ) at 2010-12-11 22:07 EST
Warning: Traceroute does not support idle or connect scan, disabling...
Interesting ports on
Not shown: 997 filtered ports
22/tcp  open   ssh     OpenSSH 5.6 (protocol 2.0)
|  ssh-hostkey: 1024 b0:gu:s (DSA)
|_ 2048 b0:gu:s (RSA)
80/tcp  closed http
631/tcp closed ipp
MAC Address: 00:16:36:22:92:70 (Quanta Computer)
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.15 - 2.6.26
Network Distance: 1 hop

OS and Service detection performed. Please report any incorrect results at .
Nmap done: 1 IP address (1 host up) scanned in 11.27 seconds
And the interface doesn't appear to be sharing the address:

[root@VIRTCENT01:~]#ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:36:22:92:70 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet6 fe80::216:36ff:fe22:9270/64 scope link 
       valid_lft forever preferred_lft forever
And I can't ping the virtual address I had tried to setup using heartbeat:

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable
I am enclosing the contents of my /etc/ha.d directory as attachments in case this is of use to anyone. I would certainly appreciate any help anyone could provide!

Attached Files
File Type: txt authkeys.txt (658 Bytes, 2 views)
File Type: txt (10.3 KB, 2 views)
File Type: txt haresources.txt (5.8 KB, 4 views)


centos55, heartbeat

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
[SOLVED] Heartbeat mail2mphani Linux - Networking 3 09-08-2010 06:48 AM
heartbeat configuration help hopehyy Linux - Server 1 07-29-2008 06:04 AM
heartbeat cluster configuration problem!!!!!! raklo Linux - Software 0 01-31-2008 05:43 AM
problem in heartbeat configuration dhanju Linux - Newbie 1 09-14-2005 03:30 PM
drbd + heartbeat kridkom Linux - Networking 1 03-18-2004 01:12 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:33 PM.

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