You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Oleg Kiorsak (JIRA)" <ji...@apache.org> on 2011/04/06 08:39:06 UTC

[jira] [Commented] (AMQ-1780) ActiveMQ broker does not automatically reconnect if the connection to the database is lost

    [ https://issues.apache.org/jira/browse/AMQ-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016274#comment-13016274 ] 

Oleg Kiorsak commented on AMQ-1780:
-----------------------------------

Is this really been fixed in 5.5 ?

I just tried out 5.5 and same thing happens - as soon as I restart the SQLService the ActiveQM broker shutdowns completely...

(NOTE: I am using same activemq.xml config files copied across from 5.4.2 instance, do I need to modify something for "fix" to take effect maybe?)

Thank you!



--- LOG ---

...
 INFO | Using Persistence Adapter: JDBCPersistenceAdapter(org.apache.commons.dbcp.BasicDataSource@1f758cd1)
 INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi
 INFO | Database adapter driver override recognized for : [microsoft_sql_server_jdbc_driver_2_0] - adapter: class org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
 INFO | Database lock driver override recognized for : [microsoft_sql_server_jdbc_driver_2_0] - adapter: class org.apache.activemq.store.jdbc.adapter.TransactDatabaseLocker
 INFO | Attempting to acquire the exclusive lock to become the Master broker
 INFO | Becoming the master on dataSource: org.apache.commons.dbcp.BasicDataSource@1f758cd1
 INFO | ActiveMQ 5.5.0 JMS Message Broker (MobTechTest1) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Listening for connections at: nio://mdtapdot01:10001
 INFO | Connector openwire Started
 INFO | Listening for connections at: stomp://mdtapdot01:10002
 INFO | Connector STOMP Started
 INFO | Listening for connections at: xmpp://mdtapdot01:10003
 INFO | Connector xmpp Started
 INFO | ActiveMQ JMS Message Broker (MobTechTest1, ID:mdtapdot01-46867-1302071153455-0:1) started
 INFO | jetty-7.1.6.v20100715
 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
 INFO | Initializing Spring root WebApplicationContext
 INFO | OSGi environment not detected.
 INFO | Apache Camel 2.7.0 (CamelContext: camel) is starting
 INFO | JMX enabled. Using ManagedManagementStrategy.
 INFO | Found 5 packages with 16 @Converter classes to load
 INFO | Loaded 152 type converters in 1.914 seconds
 INFO | Connector vm://MobTechTest1 Started
 INFO | Route: route1 started and consuming from: Endpoint[activemq://MDT.INBOUND]
 INFO | Total 1 routes, of which 1 is started.
 INFO | Apache Camel 2.7.0 (CamelContext: camel) started in 5.167 seconds
 INFO | Camel Console at http://0.0.0.0:8161/camel
 INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo
 INFO | RESTful file access application at http://0.0.0.0:8161/fileserver
 INFO | Started SelectChannelConnector@0.0.0.0:8161
ERROR | Failed to update database lock: com.microsoft.sqlserver.jdbc.SQLServerException: Broken pipe
com.microsoft.sqlserver.jdbc.SQLServerException: Broken pipe
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)
        at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1548)
        at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:2368)
        at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:2270)
        at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:1877)
        at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:4403)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:386)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
        at org.apache.activemq.store.jdbc.DefaultDatabaseLocker.keepAlive(DefaultDatabaseLocker.java:161)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.databaseLockKeepAlive(JDBCPersistenceAdapter.java:605)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter$3.run(JDBCPersistenceAdapter.java:291)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
 INFO | No longer able to keep the exclusive lock so giving up being a master
 INFO | ActiveMQ Message Broker (MobTechTest1, ID:mdtapdot01-46867-1302071153455-0:1) is shutting down
 INFO | Connector openwire Stopped
 INFO | Connector STOMP Stopped
 INFO | Connector xmpp Stopped
 INFO | Connector vm://MobTechTest1 Stopped
 INFO | PListStore:/usr/local/tollmobile/activemq54data/data/MobTechTest1/tmp_storage stopped
 INFO | ActiveMQ JMS Message Broker (MobTechTest1, ID:mdtapdot01-46867-1302071153455-0:1) stopped




> ActiveMQ broker does not automatically reconnect if the connection to the database is lost
> ------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1780
>                 URL: https://issues.apache.org/jira/browse/AMQ-1780
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>         Environment: Windows 2003 Server
>            Reporter: Jaya Srinivasan
>            Assignee: Gary Tully
>             Fix For: 5.5.0
>
>
> hi
> We are noticing that after any SQL Server restart or network blip between ActiveMQ and the database, after the connection or the database comes back online activeMQ broker needs to be restarted as well i.e it doesn't automatically re-establish connection to the database as result any message send fails because the broker is still using the stale connection to the database. 
> Is this designed behaviour or a bug? we are using ActiveMQ 5.0.0 and the latest version of the JSQLConnect database driver: version 5.7. The database we are using is MS SQL Server 2005 
> Right now, in our production environment any time we have network maintenance or database restart we also have to restart the ActiveMQ broker which is not a good option for us. 
> Also, We are using a single ActiveMQ broker and not the JDBC(Master/Slave) set up.
> Issue details in
> http://www.nabble.com/Database-connection-between-ActiveMQ-and-broker-td17321330s2354.html
> Please let me know if I need to give more information
> thanks
> jaya

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira