3 Replies Latest reply on Apr 27, 2010 10:17 PM by Ron Sigal

    Detection failure delay for JMS bisocket connection

    amar slimane Newbie

      Hi,

       

      We have the same JBoss server (JBAS5.1.0GA) running on two different networks and a JMS client.

       

      When the server is running on one network and if ethernet cable is pulled at the client side the
      failure detection has made approximately 90 seconds after :
      javax.jms.JMSException: Failure on underlying remoting connection
          at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:102)
          at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:744)

       

      If the server is running on the other network the failure detection has made approximately 5 seconds after.

       

      Why is it different, it's the same server (same configuration) and the same JMS client.

       

      Here is the content of the remoting-bisocket-service.xml file :

       

      <mbean code="org.jboss.remoting.transport.Connector"
                name="jboss.messaging:service=Connector,transport=bisocket"
                display-name="Bisocket Transport Connector">
            <attribute name="Configuration">
               <config>
                  <invoker transport="bisocket">
                 
                     <!-- There should be no reason to change these parameters - warning!
                          Changing them may stop JBoss Messaging working correctly -->           
                     <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
                     <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
                     <attribute name="dataType" isParam="true">jms</attribute>
                     <attribute name="socket.check_connection" isParam="true">false</attribute>              
                     <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
                     <attribute name="serverBindPort">${jboss.messaging.connector.bisocket.port:4457}</attribute>
                     <attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
                     <attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
              
                     <attribute name="numberOfCallRetries" isParam="true">1</attribute>
                     <attribute name="pingFrequency" isParam="true">214748364</attribute>
                     <attribute name="pingWindowFactor" isParam="true">10</attribute>
                     <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>              
                     <!-- End immutable parameters -->
                    
                     <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
                    
                     <!-- Periodicity of client pings. Server window by default is twice this figure -->                              
                     <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
                     <attribute name="validatorPingPeriod" isParam="true">60000</attribute>
                     <attribute name="validatorPingTimeout" isParam="true">30000</attribute>
                     <attribute name="registerCallbackListener">false</attribute>


                     <!-- Temps max d'attente lors d'un appel cote client (ms) -->
                     <attribute name="timeout" isParam="true">0</attribute>


                     <!-- Temps max d'inactivite avant fermeture automatique d'une connexion cote client (ms) -->
                     <attribute name="invokerDestructionDelay" isParam="true">28800000</attribute>


                     <!-- Number of seconds to wait for a connection in the client pool to become free -->
                     <attribute name="connectionWait" isParam="true">60</attribute>


                     <!-- Max Number of connections in client pool. This should be significantly higher than
                          the max number of sessions/consumers you expect -->
                     <attribute name="JBM_clientMaxPoolSize" isParam="true">10</attribute>
                    
                     <!-- The maximum time to wait before timing out on trying to write a message to socket for delivery -->
                     <attribute name="callbackTimeout">10000</attribute>
                    
                     <!-- Use these parameters to specify values for binding and connecting control connections to
                          work with your firewall/NAT configuration
                     <attribute name="secondaryBindPort">xyz</attribute>                          
                     <attribute name="secondaryConnectPort">abc</attribute>              
                     -->
                   
                     <!-- Ceci permet de fixer le port pour la connection de controle -->
                     <attribute name="secondaryBindPort">4458</attribute>
                               
                  </invoker>
                  <handlers>
                     <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
                  </handlers>
               </config>
            </attribute>
         </mbean>

       

      Thanks in advance.

        • 1. Re: Detection failure delay for JMS bisocket connection
          Ron Sigal Master

          Hi Amar,

           

          Remoting detects an apparent network problem by sending pings from the client to the server and waiting for a reply.  If the reply doesn't arrive within the configured time frame, Remoting informs JBossMessaging.  The relevant configuration parameters are

           

           

                         <attribute name="validatorPingPeriod" isParam="true">60000</attribute>
                         <attribute name="validatorPingTimeout" isParam="true">30000</attribute>

           

           

          "validatorPingPeriod" determines how often the ping is sent, and "validatorPingTimeout" determines the window within which the response must arrive.  So the ping could get sent anywhere from 0 to 60 seconds after the plug is pulled, and the problem detected anywhere from 30 to 90 seconds after the plug is pulled.  So, I can explain why the problem detection could take up to 90 seconds.  I can't explain how it could happen within 5 seconds, unless some other problem had prevented the server from sending a response to a ping that had already been sent, say 25 seconds before you pulled the plug.  Just a stab in the dark.

           

          -Ron

          • 2. Re: Detection failure delay for JMS bisocket connection
            amar slimane Newbie

            Hi Ron,

             

            What does mean the  parameter 'clientLeasePeriod'.

            The parameter's value may be not correct ?

             

            Best regards.

            • 3. Re: Detection failure delay for JMS bisocket connection
              Ron Sigal Master

              Hi Amar,

               

              Leasing is used by a Remoting server to detect network failures.  A ping is periodically sent from the client to the server, and, if the ping doesn't arrive within a specified window, the server informs any registered listeners of a possible network failure.  In particular, JBossMessaging registers a listener which will shut down a JMS connection when called.

               

              "clientLeasePeriod" determines how often a ping is sent.  It looks like you have the default value used by JBossMessaging, i.e., 10 seconds.  If your network or server are particularly busy, you might want to increase the value.

               

              -Ron