1 Reply Latest reply on Jun 8, 2009 9:11 AM by Adrian Brock

    Problem with generic clientIDs

    oliver.stauss Newbie

      Hello,
      since we have an upgrade from an JBOSS 4.0.2 to 4.2.2 We have Strange Problems with an JMS Client System.

      The JMS Client "sometimes" loose the connection to the durable Topic.
      The Client want's to re-register on the same Client it. this failes because of an "durable subscription is already in use" Exception.
      That's not fine but okay ....

      But:

      Sometimes (after loosing connection) the System generates client ids like "ID:[numeric]" !!!!!!
      This happen several times. This results in many registerd clients!

      I did not understand WHY Jboss Client/server starts to generated numeric clientID's! Found nothing on (GIYF).
      Can you help me to solve this problem?

      Here some logs:::::

      CLIENT LOG:

      * the fitst problem with connection (ping pong timeout and cannot disconnect):
      ===========================================
      ERROR 2009-05-27 12:39:54,238 [ExceptionListener Connection@17648570[token=ConnectionToken:StoreReciever/null rcvstate=STARTED]] de.xxxx.promotion.masterdata.synchronizer.MessageReceiver - onException fired:
      org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
      at org.jboss.mq.Connection$PingTask.run(Connection.java:1313)
      at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.IOException: ping timeout.
      ... 3 more
      ERROR 2009-05-27 12:39:54,287 [ExceptionListener Connection@17648570[token=ConnectionToken:StoreReciever/null rcvstate=STARTED]] de.xxxx.promotion.masterdata.synchronizer.MessageReceiver - Unexpected Exception
      org.jboss.mq.SpyJMSException: Cannot unsubscribe to this destination; - nested throwable: (java.net.SocketTimeoutException: Read timed out)
      at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
      at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
      at org.jboss.mq.Connection.removeConsumer(Connection.java:901)
      at org.jboss.mq.SpySession.removeConsumer(SpySession.java:968)
      at org.jboss.mq.SpyMessageConsumer.close(SpyMessageConsumer.java:549)
      at de.xxxx.promotion.masterdata.synchronizer.MessageReceiver.close(MessageReceiver.java:102)
      at de.xxxx.promotion.masterdata.synchronizer.MessageReceiver.onException(MessageReceiver.java:132)
      at org.jboss.mq.Connection$ExceptionListenerRunnable.run(Connection.java:1356)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
      at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2196)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2376)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2443)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2515)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2664)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:875)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:340)
      ... 1 more

      * The System tries several times to re-connect:
      ===========================================
      ERROR 2009-05-27 12:39:54,238 [ExceptionListener Connection@17648570[token=ConnectionToken:StoreReciever/null rcvstate=STARTED]] de.xxxx.promotion.masterdata.synchronizer.MessageReceiver - onException fired:
      org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
      at org.jboss.mq.Connection$PingTask.run(Connection.java:1313)
      at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.IOException: ping timeout.
      ... 3 more

      * many failed reconnects later the system starts with the strange numeric ids:
      ===========================================
      ERROR 2009-05-27 17:08:33,995 [ExceptionListener Connection@21121390[token=ConnectionToken:ID:11998/null rcvstate=STARTED]] de.xxxx.promotion.masterdata.synchronizer.MessageReceiver - onException fired:
      org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.io.EOFException)
      at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
      at org.jboss.mq.Connection.asynchFailure(Connection.java:423)
      at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:466)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:395)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.EOFException
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2666)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:875)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:340)
      ... 1 more
      ERROR 2009-05-27 17:08:33,996 [ExceptionListener Connection@21121390[token=ConnectionToken:ID:11998/null rcvstate=STARTED]] de.xxxx.promotion.masterdata.synchronizer.MessageReceiver - Unexpected Exception
      org.jboss.mq.SpyJMSException: Cannot unsubscribe to this destination; - nested throwable: (java.io.IOException: Client is not connected)
      at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
      at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
      at org.jboss.mq.Connection.removeConsumer(Connection.java:901)
      at org.jboss.mq.SpySession.removeConsumer(SpySession.java:968)
      at org.jboss.mq.SpyMessageConsumer.close(SpyMessageConsumer.java:549)
      at de.xxxx.promotion.masterdata.synchronizer.MessageReceiver.close(MessageReceiver.java:102)
      at de.xxxx.promotion.masterdata.synchronizer.MessageReceiver.onException(MessageReceiver.java:132)
      at org.jboss.mq.Connection$ExceptionListenerRunnable.run(Connection.java:1356)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.IOException: Client is not connected
      at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:288)
      at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:244)
      at org.jboss.mq.il.uil2.UILServerIL.unsubscribe(UILServerIL.java:383)
      at org.jboss.mq.Connection.removeConsumer(Connection.java:895)
      ... 6 more

      * on server.log "some minutes later" to numeric id:
      (This is an own MBean checking connections)
      ===========================================
      2009-05-27 17:16:34,029 DEBUG [de.xxxx.patch.jboss.jms.JDBCStateManager] Checking durable subscription: DurableSubscription[clientId=ID:11999 name=promotion-synchronizer selector=null], on topic: TOPIC.WWS_Warengruppen.DurableSubscription[clientId=ID:11999 name=promotion-synchronizer selector=null]
      2009-05-27 17:16:34,050 DEBUG [de.xxxx.patch.jboss.jms.JDBCStateManager] The subscription was not previously registered DurableSubscription[clientId=ID:11999 name=promotion-synchronizer selector=null]

        • 1. Re: Problem with generic clientIDs
          Adrian Brock Master

          The ID:XXXX is used when you don't do Connection.setClientID()

          The "cannot subscribe" is because you've had a network breakage but the server
          hasn't detected the failed client yet.

          The client will fire the exception listener when it detects the 'Read timeout" e.g. no
          ping/pong going over the network with the server.

          The server will still think the client is connected until it also detects the "Read Timeout"
          which might be after the client detects it and could be anything upto 2 minutes later
          (see the (Client)ReadTimeout in uil2-service.xml - default 120000ms == 2 minutes)