title: javax.security.sasl.SaslException: Authentic Failed while connecting to Jboss 7 server from remote client
body: <p>I have standalone Java client(Running from within eclipse ) that I wish to connect to an external server . If the server is localhost then i see no problems at all . However whenever i try to connect to the external server where I always gets the following exception</p>
  
  <pre><code>- JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
  - Could not register a EJB receiver for connection to remote://10.160.148.61:4447
  java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
  </code></pre>
  
  <p>I have tried to follow the steps mentioned <a href="https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI">EJB invocations from a remote client using JNDI</a></p>
  
  <p>The exception tells me tthere is something wrong in my configuration files related to authentication . Here is my ejb_client_properties file </p>
  
  <pre><code>remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
  
  remote.connections=default
  
  remote.connection.default.host=10.160.148.61
  remote.connection.default.port = 4447
  remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
  
  remote.connection.default.username=tan
  remote.connection.default.password=f2b1c3c7d3f1e224cbf6508494cf0418
  </code></pre>
  
  <p>Note : the user tan is added to my mgt.user.properties file on the server . I used add-user.bat to add a user in the server . I also added an application user . I use the same credentials to pass to the server . I cant think of anything else . </p>
  
  <p>My ejb calling is as follows :</p>
  
  <pre><code>        final Hashtable jndiProperties = new Hashtable();
          jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
  
          InitialContext aJNDI = new InitialContext(jndiProperties);
          Ppi handle = (Ppi) aJNDI
              .lookup("ejb:PPIEAR/PService/PConnect!com.gem.p.PConnection?stateful");
  </code></pre>
  
  <p>I see numerous threads related to the exception but unable to fix it :( Can someone help . </p>
  
  <p>I also have a legitimate SSL certificate installed on the server . Do i need to do something extra to take care of that ?</p>
  
  <p>Also NOTE : My server is running in standalone mode . </p>