Linux – configure Heartbeat on Centos Linux – error message

centosheartbeatheartbeat1linux

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.

Best Answer

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
Related Topic