ERROR: Bad permissions on keyfile [/etc/ha.d/authkeys], 600 recommended
I was working for setting up a cluster of 2 machines which need to be configured for High availability. So after configuring every thing else it was time for configuring High availability services.
We are using heartbeat module (linux module) for this. You need to configure following files for simple configuration:
1. /etc/ha.d/ha.cf : This file has configuration required for running heartbeat service like which interface to use for pinging the peer to know if peer-node is up or down, logging configuration etc.
2. /etc/ha.d/haresources : This file contains configuration of resources need to be controlled by high availability service. example of these resources are IP addresses ,File system, services like apache and tomcat.
3. /etc/ha.d/authkeys : This file contains some secret and used for verification of peer node. this file needs to be same on both nodes.
After configuring all these above files when i started heartbeat service, It refused to start
I gave following error:
Failed to start heartbeat : Starting High-Availability services: [FAILED]
heartbeat: ERROR: Bad permissions on keyfile [/etc/ha.d/authkeys], 600
recommended. heartbeat: ERROR: Authentication configuration error.
heartbeat: ERROR: Configuration error, heartbeat not started.
You can easily miss the message in this error and can get impression that you created wrong authkeys file and waste some of your time in that, but the message in this error is following:
Bad permissions on keyfile [/etc/ha.d/authkeys], 600 recommended
It is related to file permission of authkeys file. which was rw-r–r– was in my case. Using following command I cured the problem:
#chmod 600 /etc/ha.d/authkeys
#chown root /etc/ha.d/authkeys
** Second line is required only if file was created with some other owner.
Most Commented Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
Please check that you have similar files at both nodes.
Provide some more details of environment you are using like:
OS & version
Heartbeat version
if you can give content of /etc/ha.d/authkeys file, it will help.
I have similar files at both nodes…
OS: Ubuntu 8.04
Heartbeat version: 2.1.3-2
Content of /etc/ha.d/authkeys:
auth 1
1 md5 heartbeat
Sorry for late response but i was out of station for around 15 days. I need to try it on Ubuntu and will get back to you soon.

I have do as your instructions, but now this appear:
ERROR: Cannot open keyfile [/etc/ha.d/authkeys]. Stop.
ERROR: Authentication configuration error.
ERROR: Configuration error, heartbeat not started.
Any solution?
Thanks before.