1 Reply Latest reply on Jan 5, 2017 1:10 PM by jfisherdev

    Standalone EJB Client Random Address In Use BindException Followed By EJBCLIENT000025 IllegalStateException

    jfisherdev

      We have observed the following issue that seems to occur at random:

       

      A standalone client uses the WildFly EJB client API with scoped contexts to make a remote call to a WildFly 9 server and sometimes the EJBCLIENT000025 IllegalStateException "No EJB receiver available for handling..." will be thrown. If the call is attempted again, it usually succeeds.

       

      After looking through some client application logs, we noticed a pattern where a java.net.BindException precedes the EJBCLIENT000025 exception. An excerpt from a client log is shown below.

       

      I am curious if anyone else has encountered this or has any idea about what might be going on.

       

      Any information about this would be appreciated.

       

      WARN [org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector#] Could not register a EJB receiver for connection to $host$:$port$

      java.lang.RuntimeException: java.net.BindException: Address already in use: no further information

      at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:92)

      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:80)

      at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)

      at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:158)

      at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:115)

      at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createIdentifiableEjbClientContext(EjbNamingContext.java:258)

      at org.jboss.ejb.client.naming.ejb.EjbNamingContext.setupScopedEjbClientContextIfNeeded(EjbNamingContext.java:123)

      at org.jboss.ejb.client.naming.ejb.EjbNamingContext.<init>(EjbNamingContext.java:98)

      at org.jboss.ejb.client.naming.ejb.ejbURLContextFactory.getObjectInstance(ejbURLContextFactory.java:38)

      at javax.naming.spi.NamingManager.getURLObject(Unknown Source)

      at javax.naming.spi.NamingManager.getURLContext(Unknown Source)

      at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)

      at javax.naming.InitialContext.lookup(Unknown Source)

      ...

      at javax.swing.SwingWorker$1.call(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at javax.swing.SwingWorker.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      Caused by: java.net.BindException: Address already in use: no further information

      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

      at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)

      at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)

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

      at ...asynchronous invocation...(Unknown Source)

      at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)

      at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:388)

      at org.jboss.ejb.client.remoting.EndpointPool$PooledEndpoint.connect(EndpointPool.java:192)

      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)

      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)

      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:78)

      ... 34 more

      INFO [org.jboss.ejb.client.remoting#] EJBCLIENT000017: Received server version 2 and marshalling strategies [river]

      INFO [org.jboss.ejb.client.remoting#] EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1a65d8, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@3f8bf8,channel=jboss.ejb,nodename=crmwf]} on channel Channel ID b1ac9b9b (outbound) of Remoting connection 01046e6f to $host$/$hostIP$:$port$

      INFO [org.jboss.ejb.client.remoting#] EJBCLIENT000016: Channel Channel ID b1ac9b9b (outbound) of Remoting connection 01046e6f to $host$/$hostIP$:$port$

      can no longer process messages

      ERROR [ExceptionDetailDialog#showExceptionDetails(Component,Throwable)]

      [AWT-EventQueue-0] Wed Nov 16 10:39:42 CST 2016 EJBCLIENT000025: No EJB receiver available for handling [appName:$appName$, moduleName:$moduleName$, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@d028ca

       

      java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:$appName$, moduleName:$moduleName$, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@d028ca

      at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:774)

      at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

      at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)

      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)

      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)

      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)

      at com.sun.proxy.$Proxy19.invoke(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at EjbClient.invokeRemoteMethod(EjbClient.java:...)

      ...

      at javax.swing.SwingWorker$1.call(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at javax.swing.SwingWorker.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)