tek0011
tek0011

Reputation: 147

Could not connect to ActiveMQ Server - activemq for mcollective failing

We are continuously getting this error:

2014-11-06 07:05:34,460 [main           ] INFO  SharedFileLocker               - Database activemq-data/localhost/KahaDB/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: Failed to create directory 'activemq-data/localhost/KahaDB' 

We have verified that activemq is running as activemq, we have verified that the owner of the directories are activemq. It will not create the directories automatically, and if we create them ourselves, it still gives the same error. The service starts fine, but it will just continuously spit out the same error. There is no lock file as it will not generate any files or directories.

Upvotes: 2

Views: 2943

Answers (2)

Brian Torbich
Brian Torbich

Reputation: 31

Another way to fix this problem, in one step, is to create the missing symbolic link in /usr/share/activemq/. The permissions are already set properly on /var/cache/activemq/data/, but it seems the activemq RPM is not creating the symbolic link to that location as it should. The symbolic link should be as follows: /usr/share/activemq/activemq-data -> /var/cache/activemq/data/. After creating the symbolic link, restart the activemq service and the issue will be resolved.

Upvotes: 3

tek0011
tek0011

Reputation: 147

I was able to resolve this by the following:

ensure activemq is owner and has access to /var/log/activemq and all sub dirs.

ensure /etc/init.d/activemq has: ACTIVEMQ_CONFIGS="/etc/sysconfig/activemq"

create file activemq in /etc/sysconfig if it doesnt exist.

add this line: ACTIVEMQ_DATA="/var/log/activemq/activemq-data/localhost/KahaDB"

The problem was that activeMQ 5.9.x was using /usr/share/activemq as its KahaDB location.

Upvotes: 0

Related Questions