LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

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:

Code:
  [root@VIRTCENT01:~]#rpm -qa | grep heartbeat | grep -v -e stonith -e pils
heartbeat-2.1.4-11.el5
heartbeat-2.1.4-11.el5
I am using CentOS 5.5:
Code:
[root@VIRTCENT01:~]#uname -a
Linux VIRTCENT01.summitnjhome.com 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:

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

Code:
VIRTCENT01.summitnjhome.com 192.168.1.23
And I have /etc/ha.cf setup like this:

Code:
 #       What UDP port to use for udp or ppp-udp communication?
#
udpport        694
bcast  eth0
mcast eth0 225.0.0.1 694 1 0
ucast eth0 192.168.1.200
#       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
node    lb1.summitnjhome.com
node    lb2.summitnjhome.com
The service seems to start ok:

Code:
[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:

Code:
[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):

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

Code:
-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
COMMIT
An nmap scan does not see anything active on 694:

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

Starting Nmap 5.00 ( http://nmap.org ) at 2010-12-11 22:07 EST
Warning: Traceroute does not support idle or connect scan, disabling...
Interesting ports on 192.168.1.23:
Not shown: 997 filtered ports
PORT    STATE  SERVICE VERSION
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 http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.27 seconds
And the interface doesn't appear to be sharing the address:

Code:
[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 192.168.1.23/24 brd 192.168.1.255 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:

Code:
[root@VIRTCENT01:~]#ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data.
From 192.168.1.23 icmp_seq=1 Destination Host Unreachable
From 192.168.1.23 icmp_seq=2 Destination Host Unreachable
From 192.168.1.23 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!

Thanks!!
Attached Files
File Type: txt authkeys.txt (658 Bytes, 0 views)
File Type: txt ha.cf.txt (10.3 KB, 0 views)
File Type: txt haresources.txt (5.8 KB, 0 views)
 
  


Reply

Tags
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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration