5

When I want to access EJB on remote wildfly server from a different server, i get following error.

Error: Authentication failed: all available authentication mechanisms failed:
   JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /../wildfly/standalone-/tmp/auth/X.challenge (No such file or directory)]
   DIGEST-MD5: Server rejected authentication

If i access EJB within the server, i don't get any auth error. I use following to access server;

http-remoting://server1:8080

Basically if i call this in server1, there is no problem. If i call this from server2, i get the error. I assume it looks for auth file in server2 which exists in server1.

I am not sure if I have to make some config on EJB or wildfly to enable access from different server. I did go through every steps which are available online but clearly i am missing something.

likeachamp
  • 765
  • 4
  • 11
  • 21

2 Answers2

3

My understanding is the following. For a local access, the authentification is not required. For a remote access, the authentification is required, so I'd suggest to double check the user account and password first.

  • user/password is correct. Also, even if it is wrong, it should return auth is failied instead of 'mechanisms' failed. – likeachamp Mar 09 '17 at 18:40
2

I fixed the error with below changes.

It looks like i was using ApplicationRealm for remote authentication as well. I updated below line with my jaas realm.

<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

Also, i set SASL_POLICY_NOANONYMOUS and SASL_POLICY_NOPLAINTEXT to false on client side.

likeachamp
  • 765
  • 4
  • 11
  • 21