4 Replies Latest reply on May 3, 2012 6:43 PM by Vatsan Madabushi Branched from an earlier discussion.

    Remote access to EJBs from a different server instance

    Vatsan Madabushi Novice

      Jaikiran/DJ,

          I changed standalone.xml and added remoting subsystem and also the jboss-ejbclient.xml.  But I still get an error below.

       

      14:58:17,749 ERROR [org.jboss.remoting.remote.connection] (Remoting "etmschema" read-1) JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

       

      I have both the cliemt and server running on teh same serer but very different ports.  I didnt sepcify anything else.  I am addign snippets below.  Should I add any security realm (how and where)?

       

      PS:  I am using an editted version of standalone.xml (not the standalone-full.xml).

       

      standalone.xml

      ------------------------

      ......

      <subsystem xmlns="urn:jboss:domain:remoting:1.1">
                  <outbound-connections>
                      <remote-outbound-connection name="remote-ejb-connection" outbound-socket-binding-ref="remote-ejb1">
                          <properties>
                              <property name="SASL_POLICY_NOANONYMOUS" value="true"/>
                              <property name="SSL_ENABLED" value="false"/>
                          </properties>
                      </remote-outbound-connection>
                  </outbound-connections>
              </subsystem>
      ..................

       

      <socket-binding-group name="standard-sockets" default-interface="public">
              <socket-binding name="http" port="8880"/>
              <socket-binding name="jndi" port="18400"/>
              <socket-binding name="classServer" port="18401"/>
              <socket-binding name="jrmp" port="18402"/>
              <outbound-socket-binding name="remote-ejb1">
                  <remote-destination host="etmwfmuat2.odc.vzwcorp.com" port="42010"/>
              </outbound-socket-binding>
          </socket-binding-group>

       

      **********************************************************************************

      jboss-ejb-client.xml

      -----------------------------------

       

      <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>

        • 1. Re: Remote EJB Client access
          Vatsan Madabushi Novice

          Do I stil lneed jboss-ejb-client.properties?  If I need the properties file,why will I need to specify the ports and hostnames in 2 places (jboss-ejb-client.properties and standalone.xml - above)?

           

          here is my properties fiile.

           

          jboss-ejb-client.properties

          -------------------------------------------

          #JB7 EJB setup
          endpoint.name=client-endpoint
          remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

          remote.connections=default

          remote.connection.default.host=server1.com
          remote.connection.default.port = 42010
          remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.two.host=server1.com
          remote.connection.two.port = 42020
          remote.connection.two.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.default.username=wfmuser
          remote.connection.default.password=wfmuserPassword
          remote.connection.two.username=wfmuser
          remote.connection.two.password=wfmuserPassword

           

           

          • 2. Re: Remote EJB Client access
            Vatsan Madabushi Novice

            The issue was not at the client end.  The EJB server was accidently configured for sercure users only ( and the system that was runnign it was takign me out of the application-users.properties file) assumign that they had disabled secure access at the connector.  I did not need the jboss-ejb-client.peoperties in this case only jboss-ejb-client.xml (it has to be in the WEB-INF directory only).  Its unsercured for now.

            The bottomlime :

             

                 THE DOCUMENTAION FOR EJB INVOCATION BETWEEN 2 AS SERVERS IS CORRECT PER LINK - https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance

             

            I also coverted a standalone client per the documentation and it works perfectly as per link https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

            • 3. Re: Remote EJB Client access
              jaikiran pai Master

              FWIW, I have updated the https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance article to include a section on secured invocations between the servers.

              • 4. Re: Remote EJB Client access
                Vatsan Madabushi Novice

                I now have a new issue on gettign a remote client to alk to the EJB server.  I enabled SSL in the jboss-ejb-client.properties and also addded a user usignthe add_user.sh.  But I cant connect to the server from the standalone client.  the properties file is below.  I dont see antythign in th ejboss server logs (how can I enable extended logging) and on the client I get the exception saying that it couldnt find any EJB servers (I will post my detailed starck trace from client).

                 

                endpoint.name=client-endpoint
                remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=true

                remote.connections=one

                remote.connection.one.host=server1

                remote.connection.one.port=41010
                remote.connection.one.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
                remote.connection.one.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false
                remote.connection.one.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER
                remote.connection.one.connect.options.org.xnio.Options.SSL_STARTTLS=true
                remote.connection.one.username=user
                remote.connection.one.password=userPassword