我自己的环境是之前安装了CDH,在此基础上安装了kerberos,按照您的教程orchome/500,我在CDH中的Zookeeper启动了kafka,并引入了kerberos,踩了一系列的坑之后,碰到了一个很奇怪的现象,可以在producer中,向topic写,但是consumer无法消费。下面是我的几个配置:
client_jaas:
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/opt/kafka/config/kafka.keytab"
serviceName="kafka"
principal="kafka/node2@HADOOP.COM";
};
producer.properties
bootstrap.servers=node2:9092
compression.type=none
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka
consumer.properties
zookeeper.connect=node2:2181,node3:2181,node4:2181
zookeeper.connection.timeout.ms=6000
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka
group.id=test-consumer-group