Look above link. http://activemq.apache.org/shared-file-system-master-slave.html
2014-09-04 7:18 GMT-05:00 Rahul Bhardwaj <rahul86...@gmail.com>: > Hi All, > > I am trying to setup a master-slave with nfs4 shared file system. The > problem i am facing is that broker service (from master and slave server > separately) is not coming up with with all things correct. Please see > below what i am try to do: > > SETUP: > Amazon Ec2 > 3 servers total: > [1- master ec2 instance > 1- slave ec2 instance > 1- nfs4 server with shared directory exported to master and slave] > ActiveMQ version - 5.8 > > > > What i have done till now: > > 1) Install ActiveMQ 5.8 on master and slave ec2 instances. > 2) Setup a nfs4 server with shared path (/path/mounted/shared-file-system/) > 2) Mounted shared path from Nfs4 server to both master and slave. Thus both > master and slave has shared path now. > 3) Created a new broker in the shared path from master > COMMAND - $(ActivemqHome)/bin/activemq-admin create broker-shared > /path/mounted/shared-file-system/ > > 4) Updated the path in > /path/mounted/shared-file-system/broker-shared/conf/activemq.xml - > broker ... > > ... > <persistenceAdapter> > <kahaDB directory="/path/mounted/shared-file-system/"/> > </persistenceAdapter> > ... > </broker> > > > 5) Now trying to start the broker service one by one from master and slave > instance: > command- > Master server - > cd /path/mounted/shared-file-system/ > /broker-shared/bin/broker-shared console > > Slave server - > cd /path/mounted/shared-file-system/ > /broker-shared/bin/broker-shared console > > > ISSUE: > Service is not coming up fully, like all required ports are not starting > (The transport openwire, amqp and jetty) and as a result there can be no > connection from Client (or to Activemq admin page). Here are the startup > logs from both master and slave servers separately: > > Master (172.30.0.5) > ================================================================= > [root@ip-172-30-0-5 ~]# > /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/bin/broker-s console > INFO: Loading '/etc/default/activemq' > INFO: Using java '/usr/lib/jvm/java/bin/java' > INFO: Starting in foreground, this is just for debugging purposes (stop > process by pressing CTRL+C) > Java Runtime: Oracle Corporation 1.7.0_65 > /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre > Heap sizes: current=1005568k free=989808k max=1005568k > JVM args: -Xms1G -Xmx1G > -Djava.util.logging.config.file=logging.properties > -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote > -Djava.io.tmpdir=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/tmp > > -Dactivemq.classpath=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf; > -Dactivemq.home=/root/apache-activemq-5.8.0 > -Dactivemq.base=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s > -Dactivemq.conf=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf > -Dactivemq.data=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data > Extensions classpath: > > > [/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib,/root/apache-activemq-5.8.0/lib,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/camel,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/optional,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/web,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/extra,/root/apache-activemq-5.8.0/lib/camel,/root/apache-activemq-5.8.0/lib/optional,/root/apache-activemq-5.8.0/lib/web,/root/apache-activemq-5.8.0/lib/extra] > ACTIVEMQ_HOME: /root/apache-activemq-5.8.0 > ACTIVEMQ_BASE: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s > ACTIVEMQ_CONF: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf > ACTIVEMQ_DATA: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data > Loading message broker from: xbean:activemq.xml > INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@10d8b0f6 > : > startup date [Thu Sep 04 11:59:30 UTC 2014]; root of context hierarchy > INFO | > > PListStore:[/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data/broker-s/tmp_storage] > started > INFO | Using Persistence Adapter: > KahaDBPersistenceAdapter[/mnt/data/sharedFileSystem/sharedBrokerData] > INFO | Database /mnt/data/sharedFileSystem/sharedBrokerData/lock is > locked... waiting 10 seconds for the database to be unlocked. Reason: > java.io.IOException: No locks available > INFO | Database /mnt/data/sharedFileSystem/sharedBrokerData/lock is > locked... waiting 10 seconds for the database to be unlocked. Reason: > java.io.IOException: No locks available > ================================================================== > > > Slave (172.30.1.5) > ================================================================= > [root@ip-172-30-1-5 ~]# > /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/bin/broker-s console > INFO: Loading '/etc/default/activemq' > INFO: Using java '/usr/lib/jvm/java/bin/java' > INFO: Starting in foreground, this is just for debugging purposes (stop > process by pressing CTRL+C) > Java Runtime: Oracle Corporation 1.7.0_65 > /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre > Heap sizes: current=1005568k free=989808k max=1005568k > JVM args: -Xms1G -Xmx1G > -Djava.util.logging.config.file=logging.properties > -Dcom.sun.management.jmxremote > -Djava.io.tmpdir=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/tmp > > -Dactivemq.classpath=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf; > -Dactivemq.home=/root/apache-activemq-5.8.0 > -Dactivemq.base=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s > -Dactivemq.conf=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf > -Dactivemq.data=/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data > Extensions classpath: > > > [/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib,/root/apache-activemq-5.8.0/lib,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/camel,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/optional,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/web,/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/lib/extra,/root/apache-activemq-5.8.0/lib/camel,/root/apache-activemq-5.8.0/lib/optional,/root/apache-activemq-5.8.0/lib/web,/root/apache-activemq-5.8.0/lib/extra] > ACTIVEMQ_HOME: /root/apache-activemq-5.8.0 > ACTIVEMQ_BASE: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s > ACTIVEMQ_CONF: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/conf > ACTIVEMQ_DATA: /mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data > Loading message broker from: xbean:activemq.xml > INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@10d8b0f6 > : > startup date [Thu Sep 04 12:08:31 UTC 2014]; root of context hierarchy > INFO | > > PListStore:[/mnt/data/sharedFileSystem/sharedBrokerData/broker-s/data/broker-s/tmp_storage] > started > INFO | Using Persistence Adapter: > KahaDBPersistenceAdapter[/mnt/data/sharedFileSystem/sharedBrokerData] > INFO | Database /mnt/data/sharedFileSystem/sharedBrokerData/lock is > locked... waiting 10 seconds for the database to be unlocked. Reason: > java.io.IOException: No locks available > =================================================================== > > > What i understood from master-slave with sharedfile system setup is that > both master and slave server will have shared path where the broker > configuration will reside. And both will start the broker service > separately > on their instances but master will listen and slave will wait. Client will > connect to failover:// protocl (which is understood). > > Please tell me where i am wrong in my attempt. > > Thanks > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/v5-8-Master-Slave-shared-NFSv4-filesystem-setup-having-problem-tp4685282.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >