1 Reply Latest reply on Jan 10, 2013 9:16 AM by rcnetto

    SSL_ENABLED always true causing "No EJB receiver available for handling"

    rcnetto

      Hi all!

       

      I have an application deployed at JBoss 7.1.3 Final (EAP) that just cannot connect to another server using EJB showing me an "No EJB receiver available for handling". I think it can be related to SSL properties of the connection.

       

      Here is what matters:

      - standalone.xml configuration

      <security-realm name="ejb-security-realm">
        <server-identities>
          <secret value="dGVzdA=="/>
        </server-identities>
      </security-realm>
      

      (...)

      <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="ejb" security-realm="ejb-security-realm">
        <properties>
          <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
          <property name="SSL_ENABLED" value="false"/>
        </properties>
       </remote-outbound-connection>
      
      

       

      - When starting Jboss, I can see the properties loaded and they are not those I defined earlier.

       

      TRACE [org.jboss.remoting.remote] (MSC service thread 1-1) Attempting to connect to "/X.X.X.X:4447" with options {org.xnio.Options.SSL_ENABLED=>true,org.xnio.Options.SSL_STARTTLS=>true,org.xnio.Options.SASL_POLICY_NOANONYMOUS=>false,org.xnio.Options.SASL_POLICY_NOPLAINTEXT=>false,org.xnio.Options.SASL_DISALLOWED_MECHANISMS=>[JBOSS-LOCAL-USER]}

       

       

      - Right after that, this is the attempt to connect to the remote EJB:

      DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-1) Failed to create a connection for remote-ejb-connection. A reconnect handler will be added to the client context: java.lang.RuntimeException: Operation failed with status WAITING
                at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93) [jboss-ejb-client-1.0.10.Final-redhat-1.jar:1.0.10.Final-redhat-1]
                at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.registerRemotingEJBReceivers(DescriptorBasedEJBClientContextService.java:150) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
                at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.start(DescriptorBasedEJBClientContextService.java:102) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
      

       

      - The moment it fails when I try to invoke the remote operation:

       

      DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (ejb-client-remote-connection-reconnect-5-thread-1) Reconnect attempt#2 failed for outbound connection service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection: java.lang.RuntimeException: Operation failed with status WAITING

       

      (...)

       

      INFO  [stdout] (http-/0.0.0.0:8080-1) java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:d1-ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@b64100: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:d1-ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@b64100

       

       

      - Debugging the code I was able to invoke the operation successfully when changing:

      >> org.jboss.remoting3.remote.RemoteConnectionProvider

       

      115 final boolean useSsl = sslCapable && connectOptions.get(Options.SSL_ENABLED, true) && !connectOptions.get(Options.SECURE, false);

       

      from true, to false (it's true even defined as false at remote-outbound-connection)

       

      ****** I need a way to make the SSL properties to be kept as expected (as defined at standalone.xml) and not overwritten.

      - This is the code that overwrites my configuration (maybe I can define the properties elsewhere after this code?)

      >> org.jboss.as.remotingRemoteOutboundConnectionService.

      // Here my properties are correcty loaded (SSL_ENABLED = false)
      123        OptionMap.Builder builder = OptionMap.builder();
      124        builder.addAll(this.connectionCreationOptions);
      125        builder.set(SASL_POLICY_NOANONYMOUS, Boolean.FALSE);
      126        builder.set(SASL_POLICY_NOPLAINTEXT, Boolean.FALSE);
      127        builder.set(Options.SASL_DISALLOWED_MECHANISMS, Sequence.of(JBOSS_LOCAL_USER));
      // but here it is changed to an arbitrary value
      128        builder.set(Options.SSL_ENABLED, true);
      129        builder.set(Options.SSL_STARTTLS, true);
      

       

      I appreciate any help.

      Thanks!

      Netto

        • 1. Re: SSL_ENABLED always true causing "No EJB receiver available for handling"
          rcnetto

          In this specific case, I was able to get rid of the problem adding a new property at remote-outbound-connection: <property name="SECURE" value="true"/>, so I have:

           

          <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb" username="ejb" security-realm="ejb-security-realm">
            <properties>
              <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
              <property name="SSL_ENABLED" value="false"/>
              <property name="SECURE" value="true"/>
            </properties>
           </remote-outbound-connection>
          

           

          Now, when the code reachs:

          final boolean useSsl = sslCapable && connectOptions.get(Options.SSL_ENABLED, true) && !connectOptions.get(Options.SECURE, false);


          the "!connectOptions.get(Options.SECURE, false)" force useSsl to become false and my application can finnaly connect to the other server.

           

          I don't know why this behavior, but it solved the problem.