9 Replies Latest reply on Oct 16, 2008 8:40 PM by grafzal

    Reconnect Client

    grafzal

      I am using messaging-1.4.0.sp3.cp02.

      The clients work in a WLAN. So from time to time the connection
      to the server gets broken and is not reestablished again.
      I am working with the ClusteredConnectionFactory with supportsFailover
      enabled and this is why I dont use the ExceptionListener.

      Is there any way to configure the remoting-bisocket-service so that
      the connection will be established again or do I have to imlement
      manual failover with the ExceptionListener and disable supportsFailover?

      Thanks...

        • 1. Re: Reconnect Client
          clebert.suconic

          We have seen this scenario when the remoting.jar is not updated as stated on the docs.

          • 2. Re: Reconnect Client
            grafzal

            Thanks for your reply.

            The remoting version is JBossRemoting Version 2.2.2.SP7.

            I think I should describe my szenario a little bit better...
            I use a distributed Topic (not durable). For testing purposes
            I connect with a client and see that it works. Now I manually
            disconnect from the network and reconnect again later.
            On the client I get the following exception:

            
            org.jboss.jms.exception.MessagingJMSException: Failed to invoke
             at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
             at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
             at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$getClientID$aop(ClientConnectionDelegate.java:194)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$getClientID_N1471463430436177237.invokeNext(ClientConnectionDelegate$getClientID_N1471463430436177237.java)
             at org.jboss.jms.client.container.ConnectionAspect.handleGetClientID(ConnectionAspect.java:79)
             at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$getClientID_N1471463430436177237.invokeNext(ClientConnectionDelegate$getClientID_N1471463430436177237.java)
             at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:114)
             at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$getClientID_N1471463430436177237.invokeNext(ClientConnectionDelegate$getClientID_N1471463430436177237.java)
             at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
             at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$getClientID_N1471463430436177237.invokeNext(ClientConnectionDelegate$getClientID_N1471463430436177237.java)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate.getClientID(ClientConnectionDelegate.java)
             at org.jboss.jms.client.JBossConnection.getClientID(JBossConnection.java:96)
             at theratools.client.trapdoor.AbstractTTReceiver$MessagingThread.run(AbstractTTReceiver.java:125)
            Caused by: java.lang.IllegalStateException: Cannot find object in dispatcher with id 92-pcx78dmf-1-2g3j6cmf-jbtdu7-m6w1a162
             at org.jboss.jms.wireformat.ConnectionGetClientIDRequest.serverInvoke(ConnectionGetClientIDRequest.java:64)
             at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
             at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
             at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
             at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
             at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
             at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
             at org.jboss.remoting.Client.invoke(Client.java:1634)
             at org.jboss.remoting.Client.invoke(Client.java:548)
             at org.jboss.remoting.Client.invoke(Client.java:536)
             at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
             ... 18 more
            


            Sometimes the connection is recreated again and I get

            INFO 16-10 12:07:48,997 (FailoverCommandCenter.java:failureDetected:117) -JBoss Messaging server failure detected - waiting for failover to complete...
            INFO 16-10 12:08:51,712 (FailoverCommandCenter.java:failureDetected:177) -JBoss Messaging failover complete
            


            but most of the time it continues with the above exception over and over again.

            Somtimes I see the following warning on the server:


            12:07:49,031 WARN [ServerInvoker] Asked to terminate invoker lease for client session id 5c4o05b-7l3jjh-fmd87wbd-1-fmd87x3t-f, but lea
            se for this id could not be found.: {261a1w6u-80top9-fmc81hym-1-fmc820en-a=org.jboss.remoting.Lease@595c3f80}
            


            What I want to achieve is that the client reconnects to the server even
            if the client is disconnected for a long period of time.

            • 3. Re: Reconnect Client
              timfox

               

              "grafzal" wrote:
              do I have to imlement
              manual failover with the ExceptionListener and disable supportsFailover?


              yes

              • 4. Re: Reconnect Client
                grafzal

                Ok I tried to use the ExceptionListener and disabled failover in the ClusteredConectionFactory. Now it works great if there are more than one instance running.

                However if there is only one instance nothing seems to happen. There are
                no more warnings shown and the method onException is never triggered.

                Thank you very much...

                • 5. Re: Reconnect Client
                  ataylor

                   

                  Ok I tried to use the ExceptionListener and disabled failover in the ClusteredConectionFactory. Now it works great if there are more than one instance running.

                  However if there is only one instance nothing seems to happen. There are
                  no more warnings shown and the method onException is never triggered.


                  If you are only running one server then it isn't clustered so why use a clustered connection factory?

                  • 6. Re: Reconnect Client
                    grafzal

                    I use a clustered environment. But it should also work in case the other nodes were taken down for example for maintenance...

                    • 7. Re: Reconnect Client
                      ataylor

                       

                      I use a clustered environment. But it should also work in case the other nodes were taken down for example for maintenance...


                      Of course you are right, but its an edge case. As far as maintenance goes, you could always make sure there are at least 2 servers running. If you're bringing a box down for maintenance then you could start a new server as a temporary replacement.

                      If you want feel free to raise a JIRA and someone may look at it.

                      • 8. Re: Reconnect Client
                        timfox

                        I already said in my previous post we don't support this feature.

                        If the user wants it they can file a feature request.

                        • 9. Re: Reconnect Client
                          grafzal

                          I didnt know that. Sorry...

                          Which post are you talking abount? This might be intersting for me and I can not find it.
                          To file a feature request I will have to investigate a little bit more on it.

                          By the way, this is a great product!