Blog Archive

Thursday, November 21, 2013

CentOS 6, 64bit, Heartbeat and a missing binary

While installing heartbeat on two virtual CentOS 6.4 64bit machines I ran across a weird error:

service heartbeat start

did not return anything. Exit code was 0 and not a single line of output. Weird?

Debugging:
Running

bash -x /etc/init.d/heartbeat

showed that the script exited with code 0 after this line

[ -x /usr/libexec/heartbeat/heartbeat ]

Which turned out to be the following line in the script:

[-x $HA_BIN/heartbeat ] || exit 0

Looking up the file manually showed it wasn't there (which was weird again because I installed heartbeat using yum and I find yum to be rather reliable). So the heartbeat binary was missing. After googling for a few minutes I ran across this GitHub issue https://github.com/ClusterLabs/resource-agents/issues/330 mentioning that

The heatbeat init script expects the heartbeat binary resides in $HA_BIN/heartbeat (/usr/lib64/heartbeat/heatbeat) but it now tries to look /usr/libexec/heartbeat/heartbeat and fails.

Looking up the file /usr/lib64/heartbeat/heartbeat showed: yes, here it was. Adding a symlink to /usr/libexec/heartbeat/heartbeat like suggested at https://github.com/ClusterLabs/resource-agents/pull/285:

ln -s /usr/lib64/heartbeat/heartbeat \
/usr/libexec/heartbeat/heartbeat

Fortunately this fixed the issue and my heartbeat cluster is up and running since then.

Special thanks to 
http://www.howtoforge.com/high_availability_heartbeat_centos
@kskmori and @joelgriffiths on GitHub
as well as the team of heartbeat and Linux HA, of course.



5 comments:

  1. Hi,
    thx for the article. I prefer define HA_BIN correctly, instead of mixing lib64 and libexec dirs:
    echo "HA_BIN=/usr/lib64/heartbeat" >> /etc/sysconfig/heartbeat
    sad it's now working OOTB

    ReplyDelete
    Replies
    1. I meant "sad it's NOT working OOTB"

      Delete
    2. Hi there,

      Thank you very much for your comment. I understand your point but at the time writing I was too happy to get it working than thinking about mixing lib63 and libexec.

      Thank you,
      Daniel

      Delete
  2. Outstanding article! I want people to know just how good this information is in your article. Your views are much like my own concerning this subject. I will visit daily your blog because I know. It may be very beneficial for me. Binary Today

    ReplyDelete