In a Windows environment, when configuring ActiveMQ for master/slave setup, the following UNC path to an NFS share drive is set in the ActiveMQ configuration file activemq.xml:
<persistenceAdapter> <kahaDB directory="\\server_ip\amqshare\kahadb" /> </persistenceAdapter>
This prevents the ActiveMQ master from starting, with the following error message:
| INFO | Database \\server_ip\amqshare\kahadb\lock is locked by another server. This broker is now in slave mode waiting a lock to be acquired | org.apache.activemq.store.SharedFileLocker | main
NFS file lock does not work on the Java level. The Lock operation is not supported for NFS share on Windows using UNC with Microsoft NFS client.
NFS mount the share drive, and map it to the P drive, for example, and use P:\...\kahadb in activemq.xml:
<persistenceAdapter> <kahaDB directory="P:\kahadb" /> </persistenceAdapter>