Support Questions

Find answers, ask questions, and share your expertise

security not enabled error while running

Master Collaborator

even though security is enabled in the core-site.xml file I still get this error while running a java code

    <property>
      <name>hadoop.security.authentication</name>
      <value>kerberos</value>
    </property>
    <property>
      <name>hadoop.security.authorization</name>
      <value>true</value>
    </property>


error

$java  -classpath /usr/hdp/2.6.2.0-205/hbase/conf/hbase-site.xml:/usr/hdp/2.6.2.0-205/hbase/lib/*:/usr/hdp/2.6.2.0-205/hadoop/client/*:.  HBaseTest
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.io.IOException: Security is not enabled in core-site.xml
        at HBaseTest.main(HBaseTest.java:145)
5 REPLIES 5

@Sami Ahmad have you tried adding the core-site.xml to your -classpath ?

Master Collaborator

yes .. same result

 java  -classpath /usr/hdp/2.6.2.0-205/hbase/conf/hbase-site.xml:/usr/hdp/2.6.2.0-205/hbase/lib/*:/usr/hdp/2.6.2.0-205/hadoop/client/*:/etc/hadoop/conf/core-site.xml:.  HBaseTest
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.io.IOException: Security is not enabled in core-site.xml
        at HBaseTest.main(HBaseTest.java:145)

@Sami Ahmad,

Did you try setting it in your code

Configuration conf = new Configuration();
conf.set("hadoop.security.authentication","kerberos");
conf.set("hadoop.security.authorization",true);

Master Collaborator

is this a dead thread?

Master Collaborator

yes still the same ..