Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

ActiveMQ driver implictly shutting down mysql connection

$
0
0
I am running active MQ in master / slave mode against mySQL datastore.The two
brokers instances are broker-1 and broker -2 . The goal is to have broker-1
serve as the master and broker-2 as slave. I followed posts online and
configured borker-1 and broker-2 . I start broker-1 which completes startup
. broker-2 when started attempts to acquire lock and waits for the lock as
broker-1 holds it .

After about two hours broker-2 implicitly crashes by implicitly closing the
connection as explained by logs below .

*2015-01-16 00:28:39*,521 | INFO | Database adapter driver override
recognized for : [mysql-ab_jdbc_driver] - adapter: class
org.apache.activemq.store.jdbc.adapter.MySqlJDBCAdapter |
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | main

*2015-01-16 02:39:54*,700 | WARN | Cannot create tables due to:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after connection closed.Connection was implicitly closed
by the driver. | org.apache.activemq.store.jdbc.JDBCPersistenceAdapter |
main
2015-01-16 02:39:54,703 | WARN | Failure Details: No operations allowed
after connection closed.Connection was implicitly closed by the driver. |
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | main
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after connection closed.Connection was implicitly closed
by the driver.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)[:1.6.0_30]

This way broker-2 gets disengaged acting as a slave there by not achieving
the failover i am desiring in production.

in my activemq.xml mySQL datasource setting looks like

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://######:####/######?relaxAutoCommit=true"/>
<property name="username" value="######"/>
<property name="password" value="######"/>
<property name="maxActive" value="200"/>
<property name="poolPreparedStatements" value="true"/>
</bean>

Please help if i am missing any configuration setting .

Viewing all articles
Browse latest Browse all 5648

Trending Articles