Cannot use SASL if Hadoop security is not enabled

540 views Asked by At

I am trying to access accumulo secured with kerberos, this is my code snippet:

Instance inst = new ZooKeeperInstance(instanceName, zooServers);

KerberosToken kt = new KerberosToken(principal, f1,false);

Connector conn = inst.getConnector(principal, kt);

I am getting Exception as follows:

org.apache.accumulo.core.client.AccumuloException: java.lang.RuntimeException: Cannot use SASL if Hadoop security is not enabled

at org.apache.accumulo.core.client.impl.ServerClient.execute(ServerClient.java:67)

at org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(ConnectorImpl.java:67)
at org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(ZooKeeperInstance.java:248)
at demo.prg1.AccumuloConnection.main(AccumuloConnection.java:49)

Caused by: java.lang.RuntimeException: Cannot use SASL if Hadoop security is not enabled

1

There are 1 answers

3
Christopher On

This is expected. Accumulo provides SASL authentication to support Kerberos, as implemented on a secure Hadoop installation. See the documentation here.