0 Replies Latest reply on Mar 21, 2007 4:17 AM by Erez Axis

    Queue reconnection problem

    Erez Axis Newbie

      Hi.


      I'm using mySql to persist queue messages.


      I'm having the following problem: if the mysql server is going down and than back up, the jboss application is not able to reconnect to the sql.


      Does anyone knows of this issue and how to solve this?


      This is an example of the server's log:
      STACKTRACE:

      java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Connection reset

      ** BEGIN NESTED EXCEPTION **

      java.net.SocketException
      MESSAGE: Connection reset

      STACKTRACE:

      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
      at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316)
      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:904)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)
      at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:43)
      at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:164)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:373)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:136)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:153)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:256)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:136)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:92)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:595)


      ** END NESTED EXCEPTION **


      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1638)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:904)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)
      at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:43)
      at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:164)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:373)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:136)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:153)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:256)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:136)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:92)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:595)


      ** END NESTED EXCEPTION **


      at com.mysql.jdbc.Connection.checkClosed(Connection.java:2225)
      at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1313)
      at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1293)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:312)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:172)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:892)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)