ActiveMQ not starting : Nothing happens after activemq_1 attempting to acquire exclusive lease to become the master

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ not starting : Nothing happens after activemq_1 attempting to acquire exclusive lease to become the master

ankit.mittal100
Hi,

I am trying to start activemq but it hangs on activemq_1 attempting to
acquire exclusive lease to become the master.

activemq logs are below :

STATUS | wrapper  | 2018/07/06 10:32:29 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2018/07/06 10:32:29 | Launching a JVM...
INFO   | jvm 1    | 2018/07/06 10:32:29 | Wrapper (Version 3.2.3)
http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2018/07/06 10:32:29 |   Copyright 1999-2006 Tanuki
Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2018/07/06 10:32:29 |
INFO   | jvm 1    | 2018/07/06 10:32:29 | Java Runtime: Oracle Corporation
1.8.0_171 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre
INFO   | jvm 1    | 2018/07/06 10:32:29 |   Heap sizes: current=29696k
free=24014k  max=932352k
INFO   | jvm 1    | 2018/07/06 10:32:29 |     JVM args:
-Dactivemq.home=../.. -Dactivemq.base=../..
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl.trustStorePassword=password
-Djavax.net.ssl.keyStore=../../conf/broker.ks
-Djavax.net.ssl.trustStore=../../conf/broker.ts
-Dcom.sun.management.jmxremote
-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties
-Dactivemq.conf=../../conf -Dactivemq.data=../../data
-Djava.security.auth.login.config=../../conf/login.config -Xmx1024m
-Djava.library.path=../../bin/linux-x86-64/ -Dwrapper.key=CVbwa_Vf_SAeX2Sa
-Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000
-Dwrapper.jvm.port.max=31999 -Dwrapper.pid=37540 -Dwrapper.version=3.2.3
-Dwrapper.native_library=wrapper -Dwrapper.service=TRUE
-Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
INFO   | jvm 1    | 2018/07/06 10:32:29 | Extensions classpath:
INFO   | jvm 1    | 2018/07/06 10:32:29 |  
[../../lib,../../lib/camel,../../lib/optional,../../lib/web,../../lib/extra]
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_HOME: ../..
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_BASE: ../..
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_CONF: ../../conf
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_DATA: ../../data
INFO   | jvm 1    | 2018/07/06 10:32:30 | Loading message broker from:
xbean:activemq.xml
INFO   | jvm 1    | 2018/07/06 10:32:30 |  INFO | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@5d41bec9: startup date [Fri
Jul 06 10:32:30 CEST 2018]; root of context hierarchy
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Using Persistence Adapter:
JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@1f3d1a91)
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Database adapter driver
override recognized for : [oracle_jdbc_driver] - adapter: class
org.apache.activemq.store.jdbc.adapter.OracleJDBCAdapter
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | activemq_1 attempting to
acquire exclusive lease to become the master

I have added oracle configurations in activemq.xml

 <bean id="oracle" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close">
     <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
     <property name="url" value="jdbc:oracle:thin:@act01u.bc:1540/ACT01U"/>
     <property name="username" value="ACTIVEMQ"/>
    <property name="password" value="secret"/>
    <property name="poolPreparedStatements" value="true"/>
     </bean>

Persistent adapter config

<persistenceAdapter>
            <jdbcPersistenceAdapter createTablesOnStartup="false"
dataSource="#oracle" lockKeepAlivePeriod="5000" cleanupPeriod="60000">
                <locker>                    <lease-database-locker
lockAcquireSleepInterval="30000" maxAllowableDiffFromDBTime="1000"
leaseHolderId="activemq_1"/>
                </locker>
            </jdbcPersistenceAdapter>


Can anybody please tell what i am missing ?

Regards
Ankit



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ not starting : Nothing happens after activemq_1 attempting to acquire exclusive lease to become the master

Tim Bain
It seems like another broker process is already running against that
database, and has already acquired the lock. Each broker process you want
to run independently (not in a master-slave configuration) needs its own
database.

Tim

On Fri, Jul 6, 2018, 3:13 AM ankit.mittal100 <[hidden email]>
wrote:

> Hi,
>
> I am trying to start activemq but it hangs on activemq_1 attempting to
> acquire exclusive lease to become the master.
>
> activemq logs are below :
>
> STATUS | wrapper  | 2018/07/06 10:32:29 | --> Wrapper Started as Daemon
> STATUS | wrapper  | 2018/07/06 10:32:29 | Launching a JVM...
> INFO   | jvm 1    | 2018/07/06 10:32:29 | Wrapper (Version 3.2.3)
> http://wrapper.tanukisoftware.org
> INFO   | jvm 1    | 2018/07/06 10:32:29 |   Copyright 1999-2006 Tanuki
> Software, Inc.  All Rights Reserved.
> INFO   | jvm 1    | 2018/07/06 10:32:29 |
> INFO   | jvm 1    | 2018/07/06 10:32:29 | Java Runtime: Oracle Corporation
> 1.8.0_171 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre
> INFO   | jvm 1    | 2018/07/06 10:32:29 |   Heap sizes: current=29696k
> free=24014k  max=932352k
> INFO   | jvm 1    | 2018/07/06 10:32:29 |     JVM args:
> -Dactivemq.home=../.. -Dactivemq.base=../..
> -Djavax.net.ssl.keyStorePassword=password
> -Djavax.net.ssl.trustStorePassword=password
> -Djavax.net.ssl.keyStore=../../conf/broker.ks
> -Djavax.net.ssl.trustStore=../../conf/broker.ts
> -Dcom.sun.management.jmxremote
> -Dorg.apache.activemq.UseDedicatedTaskRunner=true
> -Djava.util.logging.config.file=logging.properties
> -Dactivemq.conf=../../conf -Dactivemq.data=../../data
> -Djava.security.auth.login.config=../../conf/login.config -Xmx1024m
> -Djava.library.path=../../bin/linux-x86-64/ -Dwrapper.key=CVbwa_Vf_SAeX2Sa
> -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000
> -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=37540 -Dwrapper.version=3.2.3
> -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE
> -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
> INFO   | jvm 1    | 2018/07/06 10:32:29 | Extensions classpath:
> INFO   | jvm 1    | 2018/07/06 10:32:29 |
>
> [../../lib,../../lib/camel,../../lib/optional,../../lib/web,../../lib/extra]
> INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_HOME: ../..
> INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_BASE: ../..
> INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_CONF: ../../conf
> INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_DATA: ../../data
> INFO   | jvm 1    | 2018/07/06 10:32:30 | Loading message broker from:
> xbean:activemq.xml
> INFO   | jvm 1    | 2018/07/06 10:32:30 |  INFO | Refreshing
> org.apache.activemq.xbean.XBeanBrokerFactory$1@5d41bec9: startup date [Fri
> Jul 06 10:32:30 CEST 2018]; root of context hierarchy
> INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Using Persistence
> Adapter:
> JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@1f3d1a91)
> INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Database adapter driver
> override recognized for : [oracle_jdbc_driver] - adapter: class
> org.apache.activemq.store.jdbc.adapter.OracleJDBCAdapter
> INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | activemq_1 attempting to
> acquire exclusive lease to become the master
>
> I have added oracle configurations in activemq.xml
>
>  <bean id="oracle" class="org.apache.commons.dbcp2.BasicDataSource"
> destroy-method="close">
>      <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>      <property name="url" value="jdbc:oracle:thin:@act01u.bc
> :1540/ACT01U"/>
>      <property name="username" value="ACTIVEMQ"/>
>     <property name="password" value="secret"/>
>     <property name="poolPreparedStatements" value="true"/>
>      </bean>
>
> Persistent adapter config
>
> <persistenceAdapter>
>             <jdbcPersistenceAdapter createTablesOnStartup="false"
> dataSource="#oracle" lockKeepAlivePeriod="5000" cleanupPeriod="60000">
>                 <locker>                    <lease-database-locker
> lockAcquireSleepInterval="30000" maxAllowableDiffFromDBTime="1000"
> leaseHolderId="activemq_1"/>
>                 </locker>
>             </jdbcPersistenceAdapter>
>
>
> Can anybody please tell what i am missing ?
>
> Regards
> Ankit
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

On Jul 6, 2018 3:13 AM, "ankit.mittal100" <[hidden email]>
wrote:

Hi,

I am trying to start activemq but it hangs on activemq_1 attempting to
acquire exclusive lease to become the master.

activemq logs are below :

STATUS | wrapper  | 2018/07/06 10:32:29 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2018/07/06 10:32:29 | Launching a JVM...
INFO   | jvm 1    | 2018/07/06 10:32:29 | Wrapper (Version 3.2.3)
http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2018/07/06 10:32:29 |   Copyright 1999-2006 Tanuki
Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2018/07/06 10:32:29 |
INFO   | jvm 1    | 2018/07/06 10:32:29 | Java Runtime: Oracle Corporation
1.8.0_171 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/jre
INFO   | jvm 1    | 2018/07/06 10:32:29 |   Heap sizes: current=29696k
free=24014k  max=932352k
INFO   | jvm 1    | 2018/07/06 10:32:29 |     JVM args:
-Dactivemq.home=../.. -Dactivemq.base=../..
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl.trustStorePassword=password
-Djavax.net.ssl.keyStore=../../conf/broker.ks
-Djavax.net.ssl.trustStore=../../conf/broker.ts
-Dcom.sun.management.jmxremote
-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties
-Dactivemq.conf=../../conf -Dactivemq.data=../../data
-Djava.security.auth.login.config=../../conf/login.config -Xmx1024m
-Djava.library.path=../../bin/linux-x86-64/ -Dwrapper.key=CVbwa_Vf_SAeX2Sa
-Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000
-Dwrapper.jvm.port.max=31999 -Dwrapper.pid=37540 -Dwrapper.version=3.2.3
-Dwrapper.native_library=wrapper -Dwrapper.service=TRUE
-Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
INFO   | jvm 1    | 2018/07/06 10:32:29 | Extensions classpath:
INFO   | jvm 1    | 2018/07/06 10:32:29 |
[../../lib,../../lib/camel,../../lib/optional,../../lib/web,../../lib/extra]
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_HOME: ../..
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_BASE: ../..
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_CONF: ../../conf
INFO   | jvm 1    | 2018/07/06 10:32:29 | ACTIVEMQ_DATA: ../../data
INFO   | jvm 1    | 2018/07/06 10:32:30 | Loading message broker from:
xbean:activemq.xml
INFO   | jvm 1    | 2018/07/06 10:32:30 |  INFO | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@5d41bec9: startup date [Fri
Jul 06 10:32:30 CEST 2018]; root of context hierarchy
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Using Persistence Adapter:
JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@1f3d1a91)
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | Database adapter driver
override recognized for : [oracle_jdbc_driver] - adapter: class
org.apache.activemq.store.jdbc.adapter.OracleJDBCAdapter
INFO   | jvm 1    | 2018/07/06 10:32:31 |  INFO | activemq_1 attempting to
acquire exclusive lease to become the master

I have added oracle configurations in activemq.xml

 <bean id="oracle" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close">
     <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
     <property name="url" value="jdbc:oracle:thin:@act01u.bc:1540/ACT01U"/>
     <property name="username" value="ACTIVEMQ"/>
    <property name="password" value="secret"/>
    <property name="poolPreparedStatements" value="true"/>
     </bean>

Persistent adapter config

<persistenceAdapter>
            <jdbcPersistenceAdapter createTablesOnStartup="false"
dataSource="#oracle" lockKeepAlivePeriod="5000" cleanupPeriod="60000">
                <locker>                    <lease-database-locker
lockAcquireSleepInterval="30000" maxAllowableDiffFromDBTime="1000"
leaseHolderId="activemq_1"/>
                </locker>
            </jdbcPersistenceAdapter>


Can anybody please tell what i am missing ?

Regards
Ankit



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ not starting : Nothing happens after activemq_1 attempting to acquire exclusive lease to become the master

ankit.mittal100
Hi Tim,

Thanks for reply... but right now there is only one ActiveMQ instance is
running.

Regards
Ankit



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ not starting : Nothing happens after activemq_1 attempting to acquire exclusive lease to become the master

Tim Bain
If you uncomment the two JDBC-related lines in log4j.properties (enabling
debugging output) and restart the broker, does the resulting output provide
any more information about what's going on?

Tim

On Tue, Jul 10, 2018, 9:18 AM ankit.mittal100 <[hidden email]>
wrote:

> Hi Tim,
>
> Thanks for reply... but right now there is only one ActiveMQ instance is
> running.
>
> Regards
> Ankit
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>