1 2 Previous Next 18 Replies Latest reply on Jun 27, 2007 1:28 PM by Claudio R

    Warning in standalone esb client with messaging

    Claudio R Novice

      Hi,

      I have created a standalone esb client with messaging.
      My client run normally, but I got this warning in jboss console:

      13:43:51,546 WARN [BisocketClientInvoker] Unable to send ping: shutting down PingTimerTask
      java.net.SocketException: Connection reset by peer: socket write error
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
       at org.jboss.remoting.transport.bisocket.BisocketClientInvoker$PingTimerTask.run(BisocketClientInvoker.java:497)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)
      13:44:26,375 WARN [SimpleConnectionManager] ConnectionManager[1c3c6d8] cannot look up remoting session ID 5c4ok4j-i4a259-f37grfrb-1-f37grg9z-4
      13:44:26,562 WARN [SimpleConnectionManager] A problem has been detected with the connection to remote client 5c4ok4j-i4a259-f37grfrb-1-f37grg9z-4. It is possible the client has exited without closing its connection(s) or there is a network problem. All connection resources corresponding to that client process will now be removed.


      This warning doesn´t occurs with jbossmq.
      In my classpath I have:

      commons-logging.jar
      javassist.jar
      jaxr-api-1.0-SNAPSHOT.jar
      jbossall-client.jar
      jboss-aop-jdk50.jar
      jbossesb-listeners.jar
      jbossesb-registry.jar
      jbossesb-rosetta.jar
      jbossesb-services.jar
      jboss-messaging.jar
      jbossts-common.jar
      juddi-client-1.0-SNAPSHOT.jar
      log4j.jar
      scout-1.0-SNAPSHOT.jar
      stax-api-1.0.1.jar
      trove.jar
      xbean.jar
      xercesImpl.jar


      My client code:

      package com;
      
      import org.jboss.soa.esb.listeners.message.MessageDeliveryAdapter;
      import org.jboss.soa.esb.message.Message;
      import org.jboss.soa.esb.message.format.MessageFactory;
      import org.jboss.soa.esb.message.format.MessageType;
      
      public class TestePipeline {
      
       public static void main(String[] args) throws Exception{
      
       MessageDeliveryAdapter deliveryAdapter = new MessageDeliveryAdapter("Cat","Serv");
      
       MessageFactory mfactory = MessageFactory.getInstance();
      
       Message requestMessage;
       Message replyMessage = null;
      
       // Create and populate the request message...
       requestMessage = mfactory.getMessage(MessageType.JBOSS_XML);
       String teste = "testando...";
       requestMessage.getBody().setContents(teste.getBytes());
      
       replyMessage = deliveryAdapter.deliverSync(requestMessage, 5000);
      
       String resp = new String(replyMessage.getBody().getContents());
       System.out.println(resp);
       }
      
      }


      Did I miss anything?
      Thanks


        • 1. Re: Warning in standalone esb client with messaging
          Kurt Stam Master

          The standalone was not cleaning up the JMSPools at the end of its run. I fixed that in the trunk yesterday.

          --Kurt

          • 2. Re: Warning in standalone esb client with messaging
            Claudio R Novice

            Hi Kurt,

            I have updated svn esb (revision 12749).
            But I got the same warning in jboss console.
            In my server.log I got:

            2007-06-21 15:37:22,921 DEBUG [org.jboss.jms.client.container.ClosedInterceptor] ClosedInterceptor.ClientProducerDelegate[-1] closed
            2007-06-21 15:37:23,406 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[127.0.0.1:2724] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1,port=2724,localport=4457].1a65fca]
            2007-06-21 15:37:23,406 DEBUG [org.jboss.jms.server.remoting.ServerSocketWrapper] cannot write CLOSING byte
            java.net.SocketException: Connection reset by peer: socket write error
             at java.net.SocketOutputStream.socketWrite0(Native Method)
             at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
             at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
             at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
             at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
             at java.io.DataOutputStream.flush(DataOutputStream.java:106)
             at org.jboss.jms.server.remoting.ServerSocketWrapper.close(ServerSocketWrapper.java:74)
             at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:481)
             at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
            2007-06-21 15:37:23,406 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=2724,localport=4457].1a65fca] closing
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: trying again
            2007-06-21 15:37:26,750 WARN [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Unable to send ping: shutting down PingTimerTask
            java.net.SocketException: Connection reset by peer: socket write error
             at java.net.SocketOutputStream.socketWrite0(Native Method)
             at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
             at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
             at org.jboss.remoting.transport.bisocket.BisocketClientInvoker$PingTimerTask.run(BisocketClientInvoker.java:497)
             at java.util.TimerThread.mainLoop(Timer.java:512)
             at java.util.TimerThread.run(Timer.java:462)
            2007-06-21 15:38:01,484 DEBUG [org.jboss.remoting.ConnectionNotifier] Server connection lost to client (session id = 5c4ok4j-xqowl6-f37kti9r-1-f37ktiu5-4
            2007-06-21 15:38:01,484 WARN [org.jboss.jms.server.connectionmanager.SimpleConnectionManager] ConnectionManager[147bc27] cannot look up remoting session ID 5c4ok4j-xqowl6-f37kti9r-1-f37ktiu5-4
            2007-06-21 15:38:01,484 WARN [org.jboss.jms.server.connectionmanager.SimpleConnectionManager] A problem has been detected with the connection to remote client 5c4ok4j-xqowl6-f37kti9r-1-f37ktiu5-4. It is possible the client has exited without closing its connection(s) or there is a network problem. All connection resources corresponding to that client process will now be removed.
            2007-06-21 15:38:01,484 DEBUG [org.jboss.jms.server.connectionmanager.SimpleConnectionManager] unregistered connection ConnectionEndpoint[9] with remoting session ID ...-f37ktiu5-4
            2007-06-21 15:38:01,484 DEBUG [org.jboss.jms.server.connectionmanager.SimpleConnectionManager] cleared up state for connection ConnectionEndpoint[9]


            Do you have any idea?
            Thanks

            • 3. Re: Warning in standalone esb client with messaging
              Kurt Stam Master

              Hi Claudio,

              Turns out I only fixed it for the QuickStarts. I will apply the same fix to the bootstrapper.


              http://jira.jboss.com/jira/browse/JBESB-641

              --Kurt

              • 4. Re: Warning in standalone esb client with messaging
                Claudio R Novice

                Hi Hurt,

                I got the revision 12773 of trunk, but the same problem persist.
                Could you verify this?

                Thanks

                • 5. Re: Warning in standalone esb client with messaging
                  Kurt Stam Master

                  You're getting this on shutdown of standalone, seeing the error on the server side right?

                  • 6. Re: Warning in standalone esb client with messaging
                    Claudio R Novice

                    Yes,

                    I don´t catch any exception in client, but I see in jboss console this warning after shutdown standalone client:

                    11:00:28,546 WARN [BisocketClientInvoker] Unable to send ping: shutting down PingTimerTask
                    java.net.SocketException: Connection reset by peer: socket write error
                     at java.net.SocketOutputStream.socketWrite0(Native Method)
                     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
                     at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
                     at org.jboss.remoting.transport.bisocket.BisocketClientInvoker$PingTimerTask.run(BisocketClientInvoker.java:497)
                     at java.util.TimerThread.mainLoop(Timer.java:512)
                     at java.util.TimerThread.run(Timer.java:462)
                    11:01:03,359 WARN [SimpleConnectionManager] ConnectionManager[19f332b] cannot look up remoting session ID 5c4ok4j-pgj5q6-f38qd63c-1-f38qd6vk-4
                    11:01:03,359 WARN [SimpleConnectionManager] A problem has been detected with the connection to remote client 5c4ok4j-pgj5q6-f38qd63c-1-f38qd6vk-4. It is possible the client has exited without closing its connection(s) or there is a network problem. All connection resources corresponding to that client process will now be removed.


                    Is there a problem?
                    Thanks.

                    • 7. Re: Warning in standalone esb client with messaging
                      Claudio R Novice

                      Hi Kurt,

                      Have you reproduced the problem?
                      Thanks

                      • 8. Re: Warning in standalone esb client with messaging
                        Kurt Stam Master

                        Yeah, the bootstrapper can gracefully shutdown if it receives a control-c. However if you start it from ant, ant will receive the control-c. Then ant turns around and kills the java process (not gracefully at this point). Not sure how to go about fixing this.

                        Maybe we should provide a run.sh/run.bat start script for the bootstrapper.

                        I do think the server figures out that it can release those resources (hence the stacktrace). So I'm not sure how much time we want to spend on this.

                        I'm open to suggestions. Does anyone know if you configure ant what to do with control-c?

                        --Kurt

                        • 9. Re: Warning in standalone esb client with messaging
                          Claudio R Novice

                          Hi Kurt,

                          I am not using control + C to stop my client.
                          My client is a only main method with a MessageDeliveryAdapter.
                          I have added my code client at the beginning of the topic.

                          Do I need add any code to force close connection on server?
                          Thanks

                          • 10. Re: Warning in standalone esb client with messaging
                            Kurt Stam Master

                            Sorry, yes in that case just add the following before you're cient exits:

                            JmsConnectionPoolContainer.removeAllPools();
                            


                            --Kurt

                            • 11. Re: Warning in standalone esb client with messaging
                              Claudio R Novice

                              Ok Kurt!

                              I have added and work out.
                              But this

                              JmsConnectionPoolContainer.removeAllPools();


                              Will it not go to affect other applications in same jboss (another .esb)?
                              Thanks






                              • 13. Re: Warning in standalone esb client with messaging
                                Kurt Stam Master

                                Sorry :).

                                1. Well the esb can be used as a sar (on the esb-server or jbossas). No issues here.

                                2. The esb can be use using the bootstrapper, this should work too (but we probably need to supply startup .sh and .bat files so as to not use ant which will consume the control-c.

                                3. You can embed the esb in your on application, which is what you did. Now you can use the bootstrapper, or you can directory go against the "internals" which is fine, but then you have to make sure to release any resources you are consuming, like the JmsConnectionPools.

                                Am I making sense? Does make you less worried?

                                --Kurt

                                • 14. Re: Warning in standalone esb client with messaging
                                  Claudio R Novice

                                  I would wish to close only connection of the specific client (in his finishing).
                                  The command JmsConnectionPoolContainer.removeAllPools() will be close all connection pool of container, Am I correct?
                                  Thanks

                                  1 2 Previous Next