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
- 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
I have tried to follow the steps mentioned EJB invocations from a remote client using JNDI
The exception tells me tthere is something wrong in my configuration files related to authentication . Here is my ejb_client_properties file
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
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 .
My ejb calling is as follows :
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");
I see numerous threads related to the exception but unable to fix it :( Can someone help .
I also have a legitimate SSL certificate installed on the server . Do i need to do something extra to take care of that ?
Also NOTE : My server is running in standalone mode .
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…