kafka 配置 kerberos 中遇到的问题
问题:requirement failed :inter.broker.listener.name must be a listener name defined in adverstised.listeners. the valid options based on currently configured listeners are PLAINTEXT原因:server.propert...
·
- 问题:
requirement failed :inter.broker.listener.name must be a listener name defined in adverstised.listeners. the valid options based on currently configured listeners are PLAINTEXT - 原因:
server.properties 中设置了重复的 adverstised.listeners 或者未设置 adverstised.listeners - 解决方法:
删除掉重复的 adverstised.listeners 或者重新设置 adverstised.listeners 就行
- 问题:
could not find a ‘kafkaserver’ or ‘sasl_plaintext.kafkaserver’ entry in the jaas configuration - 原因:
在 kafka-run-class.sh 中配置export KAFKA_OPTS=" -Djava.security.auth.login.config=etc/kafka/kafka_server_jaas.conf" 可能会读取不到属性。 - 解决方法:
建议直接将 export KAFKA_OPTS=" -Djava.security.auth.login.config=etc/kafka/kafka_server_jaas.conf" 配置到 bin/kafka-server-start 中
- 问题:
socket server failed to bind to 9092 cannot assign requested address - 原因:
produce.properties 中设置了 bootstrap.servers=node-109:9092 - 解决方法:
修改为 bootstrap.servers=localhost:9092
- 问题:
Failed to acquire lock on file .lock in /data/kafka/kafka-logs. A kafka instance in another process or thread is using this directory. - 原因:
未知。 - 解决方法:
rm -f /data/kafka/kafka-logs/.lock
如果仍然报错:
rm -rf /data/kafka/kafka-logs
- 问题:
No JAAS configuration section named ‘Server’ was foundin ‘/usr/local’ - 原因:
jaas.conf 文件中 keytab 或者 principal 属性值的双引号错误或丢失,或者文件末尾的分号丢失。
例如:
Server {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab=/keytabs/vdev-solr-01.keytab
storeKey=true
doNotPrompt=true
useTicketCache=false
debug=true
principal=HTTP/<snip>;
}
- 解决方法:
给 jaas.conf 文件中 keytab 或者 principal 属性值添加上双引号,文件末尾添加分号,确保文件正确。
如下:
Server {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/keytabs/vdev-solr-01.keytab"
storeKey=true
doNotPrompt=true
useTicketCache=false
debug=true
principal="HTTP/<snip>";
};
更多推荐
已为社区贡献1条内容
所有评论(0)