2

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.

tek0011
  • 147
  • 1
  • 4
  • 12
  • You most likely have a permissions issue on the directory path where KahaDB is assistance to create the directory. – Erik Williams Nov 06 '14 at 01:50
  • Thats what we originally thought. However we have verified that the owners of the directories are activemq. We are now ignoring the mcollective part of the this, until we figure out why activeMQ wont create the dirs/files. I have edited the post to suit. – tek0011 Nov 06 '14 at 13:11
  • Can you add the configuration for your persistenceAdapter? For example: >. I'd expect to see the full path in that exception output. If that is the full path, it is most likely attempting to create the data store in the working directory of wherever it is started from. So it could still be a permissions/space issue. – Erik Williams Nov 06 '14 at 14:37

2 Answers2

3

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.

honk
  • 9,137
  • 11
  • 75
  • 83
0

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.

tek0011
  • 147
  • 1
  • 4
  • 12
  • Why would this be stored under /var/log/? Isn't this folder being used for actual data? – deyur Sep 02 '15 at 01:53