You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Mohit Anchlia (JIRA)" <ji...@apache.org> on 2016/01/14 00:53:39 UTC

[jira] [Created] (KAFKA-3102) Kafka server unable to connect to zookeeper

Mohit Anchlia created KAFKA-3102:
------------------------------------

             Summary: Kafka server unable to connect to zookeeper
                 Key: KAFKA-3102
                 URL: https://issues.apache.org/jira/browse/KAFKA-3102
             Project: Kafka
          Issue Type: Bug
          Components: security
         Environment: RHEL 6
            Reporter: Mohit Anchlia


Server disconnects from the zookeeper with the following log. It appears that it can't determine the realm even though the setup I performed looks ok.

In here find the list of principals, logs and Jaas file:

1) Jaas file 
KafkaServer {
    com.sun.security.auth.module.Krb5LoginModule required

    useKeyTab=true
    storeKey=true
    keyTab="/mnt/kafka/kafka/kafka.keytab"
    principal="kafka/10.24.251.175@EXAMPLE.COM";
};

Client {
    com.sun.security.auth.module.Krb5LoginModule required
    useKeyTab=true
    storeKey=true
    keyTab="/mnt/kafka/kafka/kafka.keytab"
    principal="kafka/10.24.251.175@EXAMPLE.COM";
};


2) Principles from krb admin

kadmin.local:  list_principals
K/M@EXAMPLE.COM
kadmin/admin@EXAMPLE.COM
kadmin/changepw@EXAMPLE.COM
kadmin/ip-10-24-251-175.us-west-2.compute.internal@EXAMPLE.COM
kafka/10.24.251.175@EXAMPLE.COM
krbtgt/EXAMPLE.COM@EXAMPLE.COM

3) [2016-01-12 14:53:13,132] WARN SASL configuration failed: javax.security.auth.login.LoginException: Cannot locate default realm Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. (org.apache.zookeeper.ClientCnxn)
[2016-01-12 14:53:13,134] INFO Opening socket connection to server localhost/127.0.0.1:2181 (org.apache.zookeeper.ClientCnxn)
[2016-01-12 14:53:13,134] INFO zookeeper state changed (AuthFailed) (org.I0Itec.zkclient.ZkClient)
[2016-01-12 14:53:13,139] INFO Accepted socket connection from /127.0.0.1:53028 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2016-01-12 14:53:13,139] INFO Socket connection established to localhost/127.0.0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2016-01-12 14:53:13,142] INFO Client attempting to establish new session at /127.0.0.1:53028 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-01-12 14:53:13,144] INFO Established session 0x152376012690001 with negotiated timeout 6000 for client /127.0.0.1:53028 (org.apache.zookeeper.server.ZooKeeperServer)
[2016-01-12 14:53:13,146] INFO Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x152376012690001, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2016-01-12 14:53:13,146] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2016-01-12 14:53:19,087] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2016-01-12 14:53:19,088] INFO Processed session termination for sessionid: 0x152376012690001 (org.apache.zookeeper.server.PrepRequestProcessor)
[2016-01-12 14:53:19,089] INFO Session: 0x152376012690001 closed (org.apache.zookeeper.ZooKeeper)
[2016-01-12 14:53:19,089] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
[2016-01-12 14:53:19,089] INFO Closed socket connection for client /127.0.0.1:53028 which had sessionid 0x152376012690001 (org.apache.zookeeper.server.NIOServerCnxn)
[2016-01-12 14:53:19,090] FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
        at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1223)
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155)
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:129)
        at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:89)
        at kafka.utils.ZkUtils$.apply(ZkUtils.scala:71)
        at kafka.server.KafkaServer.initZk(KafkaServer.scala:278)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:168)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
        at kafka.Kafka$.main(Kafka.scala:67)
        at kafka.Kafka.main(Kafka.scala)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)