标签:
java.lang.IllegalArgumentException: hadoop.security.authentication set to: simple, not kerberos, but attempting to connect to HDFS via kerberos
at org.apache.solr.core.HdfsDirectoryFactory.initKerberos(HdfsDirectoryFactory.java:317)
at org.apache.solr.core.HdfsDirectoryFactory.init(HdfsDirectoryFactory.java:96)
at org.apache.solr.core.SolrCore.initDirectoryFactory(SolrCore.java:464)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:698)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:654)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:491)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
solrconfig.xml配置如下:
<bool name="solr.hdfs.security.kerberos.enabled">true</bool>
<str name="solr.hdfs.security.kerberos.keytabfile">/etc/security/keytabs/icps.app.keytab</str>
<str name="solr.hdfs.security.kerberos.principal">icps/h2a1.ecloud.com@ECLOUD.COM</str>
我的HDFS是通过kerberos认证的, 我就配置了kerberos认证方式
但是却报我HDFS配置变量hadoop.security.authentication是simple而不是kerberos
我自己写一个测试程序new 一个configuration把这个变量值打印出来,确实是kerberos,但是我的配置文件里面并没有显示配置这个值,这个默认值就是kerberos
于是我怀疑是HDFS的配置文件加载错了,我就显示指定HDFS配置文件的加载路径:
java -Dsolr.hdfs.confdir=/apps/icps/site -jar start.jar
结果就没报错了
标签:
原文地址:http://www.cnblogs.com/xulg/p/5529707.html