4 Replies Latest reply on May 2, 2013 9:53 AM by jaikiran

    Remote EJB Connection from JBoss to JBoss / Sporadic "No EJB receiver available for handling..." problems...

    heldwein

      Hi,

       

      I have two JBoss 7.1.1. running multiple web applications in a DMZ. The webapps call EJBS, running on a  third JBoss 7.1.1. The firewall has been opened for port 4447.

      (For the test, it is just a very simple SLSB with one method).

       

      From the configuration:

       

      Outbound Socket

       

              <outbound-socket-binding name="ejb-remote">
                  <remote-destination host="<ip address>" port="4447"/>
              </outbound-socket-binding>

       

      Subsystem Remoting

       

              <subsystem xmlns="urn:jboss:domain:remoting:1.1">
                  <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
                  <outbound-connections>
                      <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="ejb-remote" username="ejbremote"
      security-realm="EJBRealm">
                          <properties>
                              <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                              <property name="SSL_ENABLED" value="false"/>
                          </properties>
                      </remote-outbound-connection>
                  </outbound-connections>
              </subsystem>

       

      The realm is also configured. In the web app archives, I have a jboss-ejb-client.xml file:

       

      <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">

              <client-context>

                      <ejb-receivers>

                              <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

                      </ejb-receivers>

              </client-context>

      </jboss-ejb-client>

       

      After startup, everything is deployed correctly, and the webapps (from both servers) can call the EJBs.

       

       

      Problem

       

      After  a while, and unfortunately not reproducible, I see the JBoss running the webapps logs these errors:

       

      2013-04-17 15:32:51,862 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jb7web].[de.protosoft.training.rest.PersonApplication]] (MV-HTTPThread.mv-http-group.2576) Servlet.service

      () for servlet de.protosoft.training.rest.PersonApplication threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalStateException:

      No EJB receiver available for handling [appName:,modulename:jb7webejb-0.0.1-SNAPSHOT,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@2ea5855c

              at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)

              at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)

              at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)

              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)

              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)

              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

              at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:518)

              at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

              at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

              at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

              at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:jb7webejb-0.0.1-SNAPSHOT,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@2ea5855c

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

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

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

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

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

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

              at com.sun.proxy.$Proxy485.sub(Unknown Source)

              at de.protosoft.training.rest.PersonService.subNumbers(PersonService.java:122)

              at de.protosoft.training.rest.PersonService$Proxy$_$$_WeldClientProxy.subNumbers(PersonService$Proxy$_$$_WeldClientProxy.java)

              at sun.reflect.GeneratedMethodAccessor4431.invoke(Unknown Source) [:1.7.0_17]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]

              at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]

              at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)

              at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)

              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)

              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)

              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)

              ... 28 more

       

       

      This problem occurs not for all webapps - it happens e.g. for one webapp while the others can still call the EJBs.

      I have also the case, that the webapp on one server does not work, while the webapps on the other server are able to access the EJBs.

       

      After a redeployment of the webapp that cannot connect to the EJB, the problem disappears. However I cannot always redeploy my webapps ;-)

       

      Does anyone have a solution for these problems? Upgrading to the latest JBoss version is unfortunately currently not an option.

      I have already tried to replace the jboss-remoting module with version 3.2.6, but this doesn't change the behaviour.

       

       

       

      Ciao

      Christian