AnsweredAssumed Answered

Error creating SASL client

Question asked by rthimmana on Oct 31, 2014
Latest reply on Jan 8, 2016 by eyushin
Able to launch the hbase shell and use mapr-db (create, put, get etc). But not able to do the same from a java program that uses the HBase API

<code>14/10/31 18:18:03 INFO client.ZooKeeperSaslClient: Found Login Context section 'Client_simple': will use it to attempt to SASL-authenticate.
14/10/31 18:18:03 INFO zookeeper.Login: successfully logged in.
14/10/31 18:18:03 INFO client.ZooKeeperSaslClient: Client will use GSSAPI as SASL mechanism.
14/10/31 18:18:03 ERROR client.ZooKeeperSaslClient: Error creating SASL client:java.security.PrivilegedActionException: javax.security.sasl.SaslException: Failure to initialize security context [Caused by GSSException: Invalid name provided (Mechanism level: Cannot locate default realm)]
java.security.PrivilegedActionException: javax.security.sasl.SaslException: Failure to initialize security context [Caused by GSSException: Invalid name provided (Mechanism level: Cannot locate default realm)]
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:218)
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:99)
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:938)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:973)
Caused by: javax.security.sasl.SaslException: Failure to initialize security context [Caused by GSSException: Invalid name provided (Mechanism level: Cannot locate default realm)]
at com.sun.security.sasl.gsskerb.GssKrb5Client.<init>(GssKrb5Client.java:150)
at com.sun.security.sasl.gsskerb.FactoryImpl.createSaslClient(FactoryImpl.java:63)
at javax.security.sasl.Sasl.createSaslClient(Sasl.java:372)
at org.apache.zookeeper.client.ZooKeeperSaslClient$1.run(ZooKeeperSaslClient.java:223)
at org.apache.zookeeper.client.ZooKeeperSaslClient$1.run(ZooKeeperSaslClient.java:218)
</code>

Any pointers?

Outcomes