0 Replies Latest reply on Dec 14, 2013 4:21 PM by spyndi

    How to configure JBoss Remoting or XNIO Timeout in a Server to Server configuration?

    spyndi

      Hello,

       

      Is there a way to configure timeout in standalone.xml for JBoss Remoting or XNIO connections?

       

      The issue:

      I have 2 JBoss servers A and B, both running version 7.1.2. Server A invokes or calls EJBs that are deployed in Server B (using JBoss Remoting).

      Under normal circumstances, the Server A to Server B EJB lookup works fine, no issues.

       

      We are testing a scenario in which we are disconnecting the network connection between Server A and Server B and validating the EJB invocation from Server A to Server B. In this scenario, the Jboss Remoting is throwing an exception after 6 to 8 minutes, and the EJB lookup call waits for this time.

       

      This is the exception that I see in the log (which seems to be correct and as expected) :

      2013-12-13 13:25:56,276 ERROR [org.jboss.remoting.remote.connection] (Remoting “0-XXX.ABC.com" read-1) JBREM000200: Remote connection failed: java.io.IOException: Connection timed out

       

      We would like this exception to be thrown within 20 or 30 seconds instead of waiting for 6 to 8 minutes.

       

      BTW, in enabling the Jboss remoting trace, I see the following exception:

       

      2013-12-13 20:48:23,653 TRACE [org.jboss.remoting.remote.connection] (Remoting “0-XXX.ABC.com" read-1) Connection error detail: java.io.EOFException: Writes have been shut down

              at org.xnio.channels.FramedMessageChannel.send(FramedMessageChannel.java:222) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.jboss.remoting3.remote.RemoteConnection$RemoteWriteListener.send(RemoteConnection.java:293) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteConnection.send(RemoteConnection.java:120) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteConnectionChannel.closeReadsAndWrites(RemoteConnectionChannel.java:252) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:513) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:390) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteConnectionHandler.handleConnectionClose(RemoteConnectionHandler.java:108) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:361) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45) [jboss-remoting-3.2.16.GA.jar:3.2.16.GA]

              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:180) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.8.GA.jar:3.0.8.GA]

              at org.xnio.nio.NioHandle.run(NioHandle.java:90)

              at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)

       

      Basically, I’m looking for an option or parameter that can defined in standalone.xml to decrease the time it takes to throw "connection timed out” exception.  I don’t see any timeout option here :

      https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/API_Documentation/files/javadoc/org/jboss/remoting3/RemotingOptions.html

       

      I tried setting up some parameters in standalone.xml file with reference to this document : https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Development_Guide/EJB_Client_Properties.html, but Jboss server fails during startup. Not sure, what I’m doing wrong in setting these parameters.

       

      This is my current remote-outbound-connection:

      <remote-outbound-connection name=“com.abc.test" outbound-socket-binding-ref=“abc">

                        <properties>

                          <property name="KEEP_ALIVE" value="true"/>

                          <property name="org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL" value="20000"/>

                        </properties>

      </remote-outbound-connection>

       

      Please let me know if you are aware of any parameters to control the Jboss Remoting timeout value.

       

      Thank you in advance.

       

      Sudhakar