2 Replies Latest reply on Mar 20, 2009 5:20 AM by Markus Lutum

    forceRemote timeout Problems

    Markus Lutum Novice

      Hi!

      I am using JBM with remoting 222sp11brew and I have some error while using the bridge. see (http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218858#4218858)
      It is relatetd t the fact that I loose the connections to other JMS Servers.

      Gao Howard said that I should try use the forceRemote property.
      I have tried it but I receive timeouts then.
      In the end the whole JMS is not working anymore.
      He then adviced me to ask here in parallel if someone can explain this stack trace :-)

      the error is:

      Caused by: org.jboss.remoting.ConnectionFailedException: Timed out trying to create control socket
       at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.handleConnect(BisocketClientInvoker.java:272)
       at org.jboss.remoting.MicroRemoteClientInvoker.connect(MicroRemoteClientInvoker.java:263)
       at org.jboss.remoting.Client.connect(Client.java:1528)
       at org.jboss.remoting.Client.connect(Client.java:468)
       at org.jboss.remoting.callback.ServerInvokerCallbackHandler.connect(ServerInvokerCallbackHandler.java:161)
       at org.jboss.remoting.ServerInvoker.getCallbackHandler(ServerInvoker.java:1863)
       at org.jboss.remoting.ServerInvoker.handleInternalInvocation(ServerInvoker.java:1497)
       at org.jboss.remoting.transport.bisocket.BisocketServerInvoker.handleInternalInvocation(BisocketServerInvoker.java:643)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:853)
       at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
      
       at org.jboss.remoting.Client.invoke(Client.java:1640)
       at org.jboss.remoting.Client.addCallbackListener(Client.java:1709)
       at org.jboss.remoting.Client.addListener(Client.java:927)
       at org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:259)
      



      By the way! I am using an SSL Bisocket connector from the the jbm sslbisocket example configuration.
      <server>
       <mbean code="org.jboss.remoting.transport.Connector"
       name="jboss.messaging:service=Connector,transport=sslbisocket"
       display-name="SSL Bisocket Transport Connector">
       <attribute name="Configuration">
       <config>
       <invoker transport="sslbisocket">
       <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">24457</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="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</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>
       <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
       <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
       <attribute name="timeout" isParam="true">0</attribute>
       <attribute name="numberOfRetries" isParam="true">10</attribute>
       <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
       <attribute name="callbackTimeout">10000</attribute>
       <!-- if I enable this it causes the timeout error <attribute name="force_remote">true</attribute> -->
       </invoker>
       <handlers>
       <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
       </handlers>
       </config>
       </attribute>
       <depends>jboss.messaging:service=ServerSocketFactory,type=SSL</depends>
       </mbean>
      
       <mbean code="org.jboss.remoting.security.SSLServerSocketFactoryService"
       name="jboss.messaging:service=ServerSocketFactory,type=SSL"
       display-name="SSL Server Socket Factory">
       <depends optional-attribute-name="SSLSocketBuilder" proxy-type="attribute">jboss.messaging:service=SocketBuilder,type=SSL</depends>
       </mbean>
      
       <mbean code="org.jboss.remoting.security.SSLSocketBuilder"
       name="jboss.messaging:service=SocketBuilder,type=SSL"
       display-name="SSL Server Socket Factory Builder">
       <attribute name="UseSSLServerSocketFactory">true</attribute>
       </mbean>
      
      </server>
      



      Any ideas??

        • 1. Re: forceRemote timeout Problems
          Ron Sigal Master

          Hi Markus,

          When a Remoting client and server are in the same JVM, the client will, by default, make a method call directly on the server instead of marshalling and unmarshalling invocations over a pair of sockets. For example,

           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:853)
           at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
           at org.jboss.remoting.Client.invoke(Client.java:1640)
          


          shows Client.invoke() calling LocalClientInvoker.invoke(), which calls ServerInvoker.invoke(). If the server were in a different JVM, you would see Client.invoke() calling BisocketClientInvoker.invoke(), followed by a sequence of calls ending with a socket write.

          By setting the "force_remote" parameter to true, you are telling Remoting to avoid the network bypass and call BisocketClientInvoker. That's OK, but when you add

          <attribute name="force_remote">true</attribute>
          


          to the MBean configuration, you're setting "force_remote" on the server but not the client. You want to add 'isParam="true"':

          <attribute name="force_remote" isParam="true">true</attribute>
          


          which adds "force_remote=true" to the InvokerLocator. The client then gets the "force_remote" parameter from the InvokerLocator. I think that should solve your timeout problem.

          • 2. Re: forceRemote timeout Problems
            Markus Lutum Novice

            Thx Ron!

            with isParam="true" jms is working again.
            But unfortunately it has not solved my main issue.
            I have created a new Topic here so others can find it faster if its related:

            http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219740#4219740