You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rookie <pu...@gmail.com> on 2015/01/16 20:17:54 UTC
ActiveMQ driver implictly shutting down mysql connection
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 .
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-driver-implictly-shutting-down-mysql-connection-tp4690065.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ driver implictly shutting down mysql connection
Posted by rookie <va...@gmail.com>.
The reason this was happening was because of inherent bug introduced with
mysql 5.5 . Upgrading to version 5.6 solved the issue. The issue was
introduced in version 5.2 of the mysql server.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-driver-implictly-shutting-down-mysql-connection-tp4690065p4690573.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.