Я пытаюсь настроить брокеров Kafka только для меж-брокерских Kerberos.Тем не менее, я, кажется, продолжаю сталкиваться с ошибками из-за того, что, похоже, он хочет подключаться к Zookeepers через Kerberos.В настоящий момент я еще не настроил какие-либо ключевые таблицы Zookeeper.
Конфигурация JAAS моего брокера Kafka выглядит следующим образом:
KafkaServer {
com.sun.security.auth.module.Krb5LoginModule required
serviceName=kafkabroker
keytab="/etc/security/keytabs/kafka_server.keytab"
useKeyTab=true
storeKey=true
principal="kafkabroker/kafkabroker0.domain.name@REALM.COM";
org.apache.kafka.common.security.plain.PlainLoginModule required
username="user"
password="secret"
user_admin="admin"
user_alice="secret";
};
Client {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="admin"
password="secret";
};
server.properties
sasl.mechanism.inter.broker.protocol=GSSAPI
sasl.enabled.mechanisms=PLAIN, GSSAPI
security.inter.broker.protocol=SASL_SSL
sasl.kerberos.service.name=kafkabroker
ОшибкаЯ получаю с вышеупомянутой конфигурацией ниже:
[2019-02-08 10:08:17,995] ERROR SASL authentication failed using login context 'Client' with exception: {} (org.apache.zookeeper.client.ZooKeeperSaslClient)
javax.security.sasl.SaslException: Error in authenticating with a Zookeeper Quorum member: the quorum member's saslToken is null.
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslToken(ZooKeeperSaslClient.java:279)
at org.apache.zookeeper.client.ZooKeeperSaslClient.respondToServer(ZooKeeperSaslClient.java:242)
at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:805)
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:94)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1145)
[2019-02-08 10:08:18,015] ERROR [ZooKeeperClient] Auth failed. (kafka.zookeeper.ZooKeeperClient)
[2019-02-08 10:08:18,048] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.apache.zookeeper.KeeperException$AuthFailedException: KeeperErrorCode = AuthFailed for /consumers
at org.apache.zookeeper.KeeperException.create(KeeperException.java:126)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
at kafka.zookeeper.AsyncResponse.maybeThrow(ZooKeeperClient.scala:499)
at kafka.zk.KafkaZkClient.createRecursive(KafkaZkClient.scala:1456)
at kafka.zk.KafkaZkClient.makeSurePersistentPathExists(KafkaZkClient.scala:1378)
at kafka.zk.KafkaZkClient$$anonfun$createTopLevelPaths$1.apply(KafkaZkClient.scala:1370)
at kafka.zk.KafkaZkClient$$anonfun$createTopLevelPaths$1.apply(KafkaZkClient.scala:1370)
at scala.collection.immutable.List.foreach(List.scala:392)
at kafka.zk.KafkaZkClient.createTopLevelPaths(KafkaZkClient.scala:1370)
at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:373)
at kafka.server.KafkaServer.startup(KafkaServer.scala:202)
at io.confluent.support.metrics.SupportedServerStartable.startup(SupportedServerStartable.java:114)
at io.confluent.support.metrics.SupportedKafka.main(SupportedKafka.java:66)
[2019-02-08 10:08:18,056] INFO shutting down (kafka.server.KafkaServer)
[2019-02-08 10:08:18,058] WARN (kafka.utils.CoreUtils$)
java.lang.NullPointerException
at kafka.server.KafkaServer$$anonfun$shutdown$5.apply$mcV$sp(KafkaServer.scala:579)
at kafka.utils.CoreUtils$.swallow(CoreUtils.scala:86)
at kafka.server.KafkaServer.shutdown(KafkaServer.scala:579)
at kafka.server.KafkaServer.startup(KafkaServer.scala:329)
at io.confluent.support.metrics.SupportedServerStartable.startup(SupportedServerStartable.java:114)
at io.confluent.support.metrics.SupportedKafka.main(SupportedKafka.java:66)
[2019-02-08 10:08:18,060] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient)
[2019-02-08 10:08:18,063] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2019-02-08 10:08:18,065] INFO shut down completed (kafka.server.KafkaServer)
[2019-02-08 10:08:18,065] INFO Shutting down SupportedServerStartable (io.confluent.support.metrics.SupportedServerStartable)
[2019-02-08 10:08:18,065] INFO Shutting down KafkaServer (io.confluent.support.metrics.SupportedServerStartable)
[2019-02-08 10:08:18,065] INFO shutting down (kafka.server.KafkaServer)
Другими словами, я хочу только Kerberos для брокера к брокеру и PLAIN SASL_SSL для брокера - Zookeeper.Это вообще возможно?