分享

cdh lily java.io.IOException: Running in secure mode, but config doesn't have...

lyxing 发表于 2015-10-11 13:17:09 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 5 21728
本帖最后由 lyxing 于 2015-10-11 13:25 编辑

我按文档search_config_hbase_indexer_for_search配置cdh lily出错:error:config doesn't have a keytab
请问这是错在哪儿?
配置文件如下 :
cat /etc/default/solr
SOLR_PORT=8983SOLR_ADMIN_PORT=8984
SOLR_LOG=/var/log/solr
SOLR_ZK_ENSEMBLE=host-172-17-110-81:2181/solr
SOLR_HDFS_HOME=hdfs://hadoop-jkzl:8020/solr
SOLR_HDFS_CONFIG=/etc/hadoop/conf
SOLR_KERBEROS_ENABLED=true
SOLR_KERBEROS_KEYTAB=/etc/solr/conf/solr.keytab
SOLR_KERBEROS_PRINCIPAL=solr/host-172-17-110-81@JKZL
#SOLR_AUTHENTICATION_TYPE=simple
SOLR_AUTHENTICATION_TYPE=kerberos
SOLR_AUTHENTICATION_SIMPLE_ALLOW_ANON=true
SOLR_AUTHENTICATION_KERBEROS_KEYTAB=/etc/solr/conf/solr.keytab
SOLR_AUTHENTICATION_KERBEROS_PRINCIPAL=HTTP/host-172-17-110-81@JKZL
SOLR_AUTHENTICATION_KERBEROS_NAME_RULES=DEFAULT
SOLR_AUTHENTICATION_JAAS_CONF=/etc/solr/conf/jaas.conf


cat /etc/solr/conf/jaas.conf
Client {  com.sun.security.auth.module.Krb5LoginModule required  
useKeyTab=true  
useTicketCache=false  
keyTab="/etc/solr/conf/solr.keytab"  
principal="solr/host-172-17-110-81@JKZL";
};


ls -l /etc/solr/conf/solr.keytab
-r--------. 1 solr hadoop 1642 Oct  8 07:50 /etc/solr/conf/solr.keytab


more hbase-indexer-site.xml
<?xml version="1.0"?>
<configuration>
<property>
   <name>hbase.zookeeper.quorum</name>
   <value>host-172-17-110-49,host-172-17-110-77,host-172-17-110-78</value>
</property>
<property>
   <name>hbaseindexer.zookeeper.connectstring</name>
   <value>host-172-17-110-49,host-172-17-110-77,host-172-17-110-78:2181</value>
</property>
<property>
    <name>hbaseindexer.authentication.type</name>
    <value>kerberos</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.keytab</name>
    <value>/etc/hbase/conf/hbase.keytab</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.principal</name>
    <value>HTTP/host-172-17-110-81@JKZL</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.name.rules</name>
   <value>DEFAULT</value>
  </property>
</configuration>


more /etc/hbase-solr/conf/jaas.conf
Client {
  com.sun.security.auth.module.Krb5LoginModule required  
useKeyTab=true  
useTicketCache=false
  keyTab="/etc/hbase/conf/hbase.keytab"
  principal="hbase/host-172-17-110-81@JKZL";
};


grep login hbase-indexer-env.sh
export HBASE_INDEXER_OPTS="$HBASE_INDEXER_OPTS -XX:+UseConcMarkSweepGC -Djava.security.auth.login.config=/etc/hbase-solr/conf/jaas.conf"
我使用命令add-indexer ,hbase-solr's 日志出现如下错误:
15/10/10 03:19:41    INFO zookeeper.ZooKeeper: Initiating client   connection,      connectString=host-172-17-110-77:2181,host-172-17-110-49:2181,host-172-17-110-78:2181   sessionTimeout=90000      watcher=host-172-17-110-81,57865,14444471812720x0,      quorum=host-172-17-110-77:2181,host-172-17-110-49:2181,host-172-17-110-78:2181,   baseZNode=/hbase

15/10/10 03:19:41 INFO client.ZooKeeperSaslClient:     Client will use GSSAPI as SASL mechanism.
15/10/10 03:19:41 DEBUG      client.ZooKeeperSaslClient: creating sasl client:      client=hbase/host-172-17-110-81@JKZL;service=zookeeper;serviceHostname=host-172-17-110-49
   15/10/10 03:19:41 ERROR supervisor.IndexerSupervisor: Problem      starting indexer myIndexer
java.io.IOException: Running in secure      mode, but config doesn't have a keytab
             at org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:236)
             at org.apache.hadoop.hbase.security.User$SecureHadoopUser.login(User.java:383)
             at org.apache.hadoop.hbase.security.User.login(User.java:250)
             at com.ngdata.sep.impl.SepConsumer.<init>(SepConsumer.java:163)
             at com.ngdata.hbaseindexer.supervisor.IndexerSupervisor.startIndexer(IndexerSupervisor.java:234)
             at com.ngdata.hbaseindexer.supervisor.IndexerSupervisor.access$1000(IndexerSupervisor.java:78)
             at com.ngdata.hbaseindexer.supervisor.IndexerSupervisor$EventWorker.run(IndexerSupervisor.java:407)
             at java.lang.Thread.run(Thread.java:745)




已有(5)人评论

跳转到指定楼层
s060403072 发表于 2015-10-11 20:50:50
hbase-indexer-site.xml  是否修改
[mw_shl_code=bash,true]  <property>
    <name>hbaseindexer.authentication.type</name>
    <value>kerberos</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.keytab</name>
    <value>hbase.keytab</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.principal</name>
    <value>HTTP/localhost@LOCALHOST</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.name.rules</name>
    <value>DEFAULT</value>
  </property>[/mw_shl_code]

还有下面一系列配置等

回复

使用道具 举报

lyxing 发表于 2015-10-11 21:35:05
主贴中已把我修改的东西都贴出来了。
hbase-indexer-site.xml改动了以下内容:
[mw_shl_code=xml,true] <property>
    <name>hbaseindexer.authentication.kerberos.keytab</name>
    <value>/etc/hbase/conf/hbase.keytab</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.principal</name>
    <value>HTTP/host-172-17-110-81@JKZL</value>
  </property>[/mw_shl_code]
回复

使用道具 举报

lyxing 发表于 2015-10-12 09:31:26
回复内容尽然看不到,一片空白,再次回复如下:

hbase-indexer-site.xml  有修改kerberos认证信息
<property>
    <name>hbaseindexer.authentication.type</name>
    <value>kerberos</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.keytab</name>
    <value>/etc/hbase/conf/hbase.keytab</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.principal</name>
    <value>HTTP/host-172-17-110-81@JKZL</value>
  </property>
  <property>
    <name>hbaseindexer.authentication.kerberos.name.rules</name>
   <value>DEFAULT</value>
  </property>
回复

使用道具 举报

arsenduan 发表于 2015-10-12 11:48:13
lyxing 发表于 2015-10-12 09:31
回复内容尽然看不到,一片空白,再次回复如下:

hbase-indexer-site.xml  有修改kerberos认证信息

安全模式???
hadoop安全模式是不允许操作的吧
回复

使用道具 举报

lyxing 发表于 2015-10-12 12:44:40
本帖最后由 lyxing 于 2015-10-12 12:45 编辑

不是安全模式,已正常启动hadoop,hadoop能正常操作。hadoop的安全模式叫safe mode。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条