- 论坛徽章:
- 1
|
我使用cdh5.4.5配置lily,配置如下:
cat /etc/default/solr
SOLR_PORT=8983
SOLR_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";
};
ls -l /etc/hbase/conf/hbase.keytab
-r--------. 1 hbase root 1654 Oct 9 06:55 /etc/hbase/conf/hbase.keytab
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"
使用下面命令注册索引时报错: hbase-indexer add-indexer --name myIndexer --indexer-conf morphline-hbase-mapper.xml --connection-param solr.zk=host-172-17-110-81/solr --connection-param solr.collection=hbase-collection1 --zookeeper host-172-17-110-49,host-172-17-110-78:2181
错误日志如下:
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:7
at com.ngdata.hbaseindexer.supervisor.IndexerSupervisor$EventWorker.run(IndexerSupervisor.java:407)
at java.lang.Thread.run(Thread.java:745) |
|