7 Replies Latest reply on Sep 25, 2007 10:03 AM by jwilker

    createConnection hangs

    bob_walker99

      Hi,
      I've been seeing this for a while and alsways put it down to classpath issues, but I'm quite an expert at which jboss client jars work and which don't, and what needs to go where, so I'm no longer convinced that this is the issue.

      What's happening is that at seemingly random junctures, calls to createConnection stop working. they sit in this stack:

      at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
      at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)
      at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
      at java/net/SocketInputStream.read(SocketInputStream.java:129)
      at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
      at java/io/BufferedInputStream.read(BufferedInputStream.java:237)
      ^-- Holding lock: java/io/BufferedInputStream@0x403bf048[thin lock]
      at java/io/FilterInputStream.read(FilterInputStream.java:66)
      at org/jboss/remoting/transport/socket/MicroSocketClientInvoker.readVersion(MicroSocketClientInvoker.java:1000)
      at org/jboss/remoting/transport/socket/MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:574)
      at org/jboss/remoting/transport/bisocket/BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
      at org/jboss/remoting/MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
      at org/jboss/remoting/Client.invoke(Client.java:1634)
      at org/jboss/remoting/Client.invoke(Client.java:548)
      at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDele gate.java:164)
      at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext()Ljava/lang/Object;(ClientConnectionFactoryDelegate$createCon nectionDelegate_N3019492359065420858.java)
      at org/jboss/jms/client/container/StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
      at org/jboss/aop/advice/org/jboss/jms/client/container/StateCreationAspect0.invoke(Lorg/jboss/aop/joinpoint/Invocation;)Ljava/lang/Object;(StateCreationAspect0.java)
      at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext()Ljava/lang/Object;(ClientConnectionFactoryDelegate$createCon nectionDelegate_N3019492359065420858.java)
      at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.createConnectionDelegate(Ljava/lang/String;Ljava/lang/String;I)Lorg/jboss/jms/delegate/CreateConnectionResult;(ClientC onnectionFactoryDelegate.java)
      at org/jboss/jms/client/JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
      at org/jboss/jms/client/JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
      at org/jboss/jms/client/JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
      


      but never returns. This can happen without me changing anything, but once it happens it is unrecovereable. All future runs of the code do the same thing, restarting the client and the server has no effect. I'm using the latest 1.4.0CR2 jars withthe remoting update too.

      I'm sorry I can't suggest what may be happening here, I'm at the end of my tether; if anyone at all can help I'd be eternally grateful. I'm having to explore other MQ providers because I can't get past the problems I'm having with JBoss Messaging and it's costing me too much time investigating.


        • 1. Re: createConnection hangs
          clebert.suconic

          I would need a thread dump on client/server to verify...

          Trace logs would also help!


          Clebert

          • 2. Re: createConnection hangs
            bob_walker99

            Thanks Clebert, I've mailed you the thead dumps.

            • 3. Re: createConnection hangs
              jwilker

              I am in the process of migrating from from JBoss MQ to JBoss Messaging, and have a scenario that will consistently hang createTopicConnection with a similar stack trace, although with JBoss AS 4.2.1GA/JBoss Messaging 1.3.0GA.

              Clebert, I will mail client/server thread dumps as additional input.

              • 4. Re: createConnection hangs
                timfox

                 

                "bob_walker99" wrote:
                Hi,
                I've been seeing this for a while and alsways put it down to classpath issues, but I'm quite an expert at which jboss client jars work and which don't, and what needs to go where, so I'm no longer convinced that this is the issue.


                With JBM 1.4 the jars are very straightforward.

                If you are only using JBM from within the app server, then you just need to drop jboss-messaging.jar and remoting 2.2.2 jar in the server/lib directory. (See install guide).

                To run JBM from the client you simply need the messaging-client.jar on your client classpath and the standard jboss-all-client.jar from the AS distribution.

                • 5. Re: createConnection hangs
                  timfox

                  Also, of course, if you have updated remoting to 2.2.2 on the server - you need to do this on the client too! Make sure it is on the classpath *before* jboss-all-client.jar

                  • 6. Re: createConnection hangs
                    jwilker

                    Updating to JBM 1.4.0.CR2/Remoting 2.2.0GA appears to have resolved this issue for me.

                    • 7. Re: createConnection hangs
                      jwilker

                      I recently upgraded to JBM 1.4.0.CR3/Remoting 2.2.2.SP1, and all appears to work fine.

                      However, I noticed that if you accidently try to connect a client to the JBM server using an incorrect client remoting library, then all future client createConnection calls will hang (even with the correct client remoting libraries).

                      The JBM server has to be restarted to correct the problem.

                      Has anyone else seen this?