Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed Heartbeat on my Centos Linux and it seems to partially work..but I'm trying to monitor a service with no success. only when I reboot the main server the backup server takes over. in the logs I get :

heartbeat[30476]: 2012/03/20_18:51:57 WARN: string2msg_ll: node [node1] failed authentication
heartbeat[30476]: 2012/03/20_18:51:58 WARN: string2msg_ll: node [node02] failed authentication

the authkeys is identical (copied from one to another). this is my ha.cf:

logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
initdead 120
bcast eth0
udpport 694
auto_failback on
node server01.com 
node server02.com

haresources :

server01.com 38.108.117.3 aim chat

any idea how to fix the problem so if a service stops the other server take over Thanks! E.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You are using the heartbeat v1 syntax. If you use that here will be no monitoring (per default). If you want monitoring as well you will have to convert to v2 syntax (XML) and will have to add monitoring methods.

Some other notes about your configuration:

  • Auto-failback is never a good idea. You can create a nice "ping pong" with that
  • Broadcasting in not a good idea with just two nodes. Use ucast instead.
  • Just a single network connection? Have fun with lots of split-brains.

Now back to your initial question: This looks as if other nodes (from different clusters?) try to communicate on the same broadcast-IP and the same UDP-port.

"Your" nodes are "server01.com" and "server02.com" - you see two other nodes ("node1" and "node02").

  • Use different UDP-ports for every cluster
  • Use unicast instead of broadcast (see above).

Update: How to configure unicast:

RTFM (read the fine manual) from rpm -qd|grep "ha.cf":

#       Set up a unicast / udp heartbeat medium
#       ucast [dev] [peer-ip-addr]
#
#       [dev]           device to send/rcv heartbeats on
#       [peer-ip-addr]  IP address of peer to send packets to
#
#ucast eth0 192.168.1.2
share|improve this answer
    
Thanks!! I'm trying to change it and I get the following Error: [FAILED] heartbeat[22579]: 2012/03/21_07:43:04 ERROR: Illegal directive [unicast] in /etc/ha.d/ha.cf heartbeat[22579]: 2012/03/21_07:43:04 ERROR: Heartbeat not started: configuration error. heartbeat[22579]: 2012/03/21_07:43:04 ERROR: Configuration error, heartbeat not started. –  edotan Mar 21 '12 at 8:15
    
@EladDotan I updated my answer. In you case you have to provide two lines: ucast eth0 IP_of_server01.com ucast eth0 IP_of_server02.com –  Nils Mar 21 '12 at 21:21
add comment

To monitor and failover services (and not just boxes), you will need the full Pacemaker/Corosync/Heartbeat setup, not just basic Heartbeat. If you're using haresources, you're using basic Heartbeat.

Installation from EPEL can be found here:

http://www.clusterlabs.org/wiki/Install#Installing_on_EPEL-5_Compatible_Distributions:_RHEL.2C_CentOS.2C_etc

The ClusterLabs wiki will have other documentation on configuring Pacemaker for specific services.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.