Kafka SASL配置问题

7℃ 发表于: 2018-12-13   最后更新时间: 2018-12-15 00:12:03   3,541 游览

配置SASL_PLAINTEXT后,删除了解压目录,然后重新解压未配置SASL_PLAINTEXT 启动kafka报错,链接超时

报错如下:

[2018-12-13 10:39:27,096] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
[2018-12-13 10:39:27,096] INFO Client environment:user.dir=/usr/local/kafka_2.11-2.0.0 (org.apache.zookeeper.ZooKeeper)
[2018-12-13 10:39:27,100] INFO Initiating client connection, connectString=192.168.1.67:2181 sessionTimeout=6000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@61862a7f (org.apache.zookeeper.ZooKeeper)
[2018-12-13 10:39:27,154] INFO [ZooKeeperClient] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2018-12-13 10:39:33,157] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient)
[2018-12-13 10:39:37,165] INFO Opening socket connection to server 192.168.1.67/192.168.1.67:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2018-12-13 10:39:37,248] INFO Socket connection established to 192.168.1.67/192.168.1.67:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-12-13 10:39:37,249] INFO Accepted socket connection from /192.168.1.67:49159 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-12-13 10:39:37,358] INFO Client attempting to establish new session at /192.168.1.67:49159 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-12-13 10:39:37,362] INFO Creating new log file: log.1 (org.apache.zookeeper.server.persistence.FileTxnLog)
[2018-12-13 10:39:37,390] INFO Established session 0x100000b89b70000 with negotiated timeout 6000 for client /192.168.1.67:49159 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-12-13 10:39:37,392] INFO Session establishment complete on server 192.168.1.67/192.168.1.67:2181, sessionid = 0x100000b89b70000, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2018-12-13 10:39:37,399] INFO Processed session termination for sessionid: 0x100000b89b70000 (org.apache.zookeeper.server.PrepRequestProcessor)
[2018-12-13 10:39:37,419] INFO Closed socket connection for client /192.168.1.67:49159 which had sessionid 0x100000b89b70000 (org.apache.zookeeper.server.NIOServerCnxn)
[2018-12-13 10:39:37,419] INFO Session: 0x100000b89b70000 closed (org.apache.zookeeper.ZooKeeper)
[2018-12-13 10:39:37,422] INFO EventThread shut down for session: 0x100000b89b70000 (org.apache.zookeeper.ClientCnxn)
[2018-12-13 10:39:37,426] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2018-12-13 10:39:37,448] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply$mcV$sp(ZooKeeperClient.scala:230)
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:226)
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:226)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
        at kafka.zookeeper.ZooKeeperClient.kafka$zookeeper$ZooKeeperClient$$waitUntilConnected(ZooKeeperClient.scala:226)
        at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:95)
        at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1580)
        at kafka.server.KafkaServer.kafka$server$KafkaServer$$createZkClient$1(KafkaServer.scala:348)
        at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:372)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:202)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
        at kafka.Kafka$.main(Kafka.scala:75)
        at kafka.Kafka.main(Kafka.scala)
[2018-12-13 10:39:37,452] INFO shutting down (kafka.server.KafkaServer)
[2018-12-13 10:39:37,454] 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 kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
        at kafka.Kafka$.main(Kafka.scala:75)
        at kafka.Kafka.main(Kafka.scala)
[2018-12-13 10:39:37,458] INFO shut down completed (kafka.server.KafkaServer)
[2018-12-13 10:39:37,458] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2018-12-13 10:39:37,464] INFO shutting down (kafka.server.KafkaServer)

不知道大家有没有碰到过这个情况 求大神解答

发表于 2018-12-13
添加评论

补充: 将server.properties中的 zk地址  zookeeper.connect=192.168.1.67:2181  修改成 zookeeper.connect=127.0.0.1:2181   则可以正常启动

半兽人 -> 7℃ 6年前

你telnet下192.168.1.67 2181

你的答案

查看kafka相关的其他问题或提一个您自己的问题