Using EAP 6.2 client jars to connect to AS 6.2 EAP fails with hang

Latest response

Hi all,

our customer is experiencing problems when connecting to remote ejb's under load (about 40 clients). After some time no client is able to connect to the server anymore and the following exception occurred:

java.lang.RuntimeException: Operation failed with status WAITING
  at org.jboss.ejb.client.remoting.IoFutureHelper.get(
  at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(
  at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(
  at org.jboss.ejb.client.remoting.MaxAttemptsReconnectHandler.tryConnect(
  at org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler.reconnect(
  at org.jboss.ejb.client.EJBClientContext$

A thread dump of the server was taken right after the problem occurred and a second one an our later (no change).

It seems that the thread "sap-iwp-01t1" read-1" is waiting to lock the resource <0x00000000b007dfd0>, which is locked by the thread "sap-iwp-01t1" task-3":

    "Remoting "sap-iwp-01t1" read-1" prio=10 tid=0x00007f9b88022870 nid=0x4ab5 waiting for monitor entry [0x00007f9b245a4000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    - waiting to lock <0x00000000b007dfd0> (a

    "Remoting "sap-iwp-01t1" task-3" prio=10 tid=0x00007f9a40052ab0 nid=0x4cd8 in Object.wait() [0x00007f9b277f6000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000ca35ff98> (a org.xnio.streams.BufferPipeOutputStream)
    at java.lang.Object.wait(
    at org.jboss.remoting3.remote.OutboundMessage$1.accept(
    at org.xnio.streams.BufferPipeOutputStream.send(
    - locked <0x00000000b007dfd0> (a

Our customer did not change the configuration for the remoting worker thread pool. As far as i know the following is the standard configuration:

<subsystem xmlns="urn:jboss:domain:remoting:1.1">
   <worker-thread-pool read-threads="1" task-core-threads="4" task-keepalive="60" task-limit="16384" task-max-threads="16" write-threads="1"/>

The client is using the following code to connect to the server via the EJB client API:

    static synchronized void setContextSelector(final ClassLoader classLoader, final String appServerURL, final String appServerUser, final String appServerPassword) {
    Properties props = new Properties();
    props.put("", "client-endpoint");
    props.put("", "false");
    props.put("remote.connections", "default");
    props.put("", host);
    props.put("remote.connection.default.port", port);
    props.put("", "JBOSS-LOCAL-USER");
    props.put("", "true");
    props.put("", "false");
    props.put("remote.connection.default.username", appServerUser);
    props.put("remote.connection.default.password", appServerPassword);

    final Class c = Class.forName("org.jboss.ejb.client.EJBClientContext", false, classLoader);
    final Method m = c.getMethod("setSelector", new Class[]{Class.forName("org.jboss.ejb.client.ContextSelector")});
    m.invoke(null, new Object[]{createContextSelector(classLoader, props)});

  private static Object createContextSelector(final ClassLoader classLoader, final Properties props) throws ClassNotFoundException, 
  NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
    final Class c1 = Class.forName("org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration", false, classLoader);
    final Object o = c1.getConstructor(new Class[]{Properties.class}).newInstance(new Object[]{props});
    final Class c2 = Class.forName("org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector", false, classLoader);
    return c2.getConstructor(new Class[]{Class.forName("org.jboss.ejb.client.EJBClientConfiguration")}).newInstance(new Object[]{o});

In addition we use the remote-naming API to look up some jndi entries (Strings).

Another problem is that the firewall cuts off inactive connections. Maybe the configuration of an keep alive event could be a solution:

The JBoss Version our customer is using is JBOSS 6.2 EAP (no patches applied).

What could be the reason for this error? Should our customer change the worker thread pool configuration?



A problem of this complexity is not easily resolved via the Discussions forum. Instead I recommend you open a Support Case. To raise a support case, log in to the Customer Portal and at the top you'll see a link named "Support Cases". Click on this link and raise a new case.

our customer raised a support case. The answer from Red Hat is, that the issue may be related to
Red Hat Customer Portal.
The solution is to upgrade to JBoss 6.3.2 EAP.