ActiveMQ issue with UNC path an NFS shared directory

Problem Description

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

 

Root Cause

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.

 

Solution

NFS mount the share drive, and map it to the drive, for example, and use P:\...\kahadb in activemq.xml:

 

<persistenceAdapter>
  <kahaDB directory="P:\kahadb" />
</persistenceAdapter>
Version history
Revision #:
4 of 4
Last update:
‎06-22-2018 12:48 PM
Updated by:
 
Labels (2)
Contributors
Comments
Seven Stars

Isn't that message expected as part of master/slave configuration?

 

| 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

 

reference link : https://community.talend.com/t5/Installation/Installing-Apache-ActiveMQ-in-a-master-slave-active-pas...