【问题标题】:kafka dont work for me using for first time Connection refused .ZooKeeperClientkafka 不适合我第一次使用 Connection denied .ZooKeeperClient
【发布时间】:2021-10-08 09:55:13
【问题描述】:

我第一次安装 kafka。 我想开始它。 当我运行 .\bin\windows\kafka-server-start.bat .\config\server.properties 我得到了这个结果

[2021-10-08 10:03:43,563] INFO Socket error occurred: localhost/0:0:0:0:0:0:0:1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:44,693] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:46,743] INFO Socket error occurred: localhost/0:0:0:0:0:0:0:1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:47,873] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:49,928] INFO Socket error occurred: localhost/0:0:0:0:0:0:0:1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:51,043] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:53,093] INFO Socket error occurred: localhost/0:0:0:0:0:0:0:1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:54,233] INFO Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:56,283] INFO Socket error occurred: localhost/127.0.0.1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:57,403] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:59,443] INFO Socket error occurred: localhost/0:0:0:0:0:0:0:1:2181: Connection refused: no further information (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:59,523] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2021-10-08 10:03:59,683] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2021-10-08 10:03:59,693] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
[2021-10-08 10:03:59,708] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2021-10-08 10:03:59,713] 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.waitUntilConnected(ZooKeeperClient.scala:271)
        at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:125)
        at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1948)
        at kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:431)
        at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:456)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:191)
        at kafka.Kafka$.main(Kafka.scala:109)
        at kafka.Kafka.main(Kafka.scala)
[2021-10-08 10:03:59,723] INFO shutting down (kafka.server.KafkaServer)
[2021-10-08 10:03:59,743] INFO App info kafka.server for 0 unregistered (org.apache.kafka.common.utils.AppInfoParser)
[2021-10-08 10:03:59,743] INFO shut down completed (kafka.server.KafkaServer)
[2021-10-08 10:03:59,743] ERROR Exiting Kafka. (kafka.Kafka$)
[2021-10-08 10:03:59,752] INFO shutting down (kafka.server.KafkaServer)

【问题讨论】:

    标签: java sockets cmd apache-zookeeper apache-kafka-streams


    【解决方案1】:

    为了启动kafka

    1. 启动动物园管理员
    2. 启动kafka服务器

    Kafka 服务器依赖于 zookeeper。 为了了解流程,请访问以下提到的站点, https://www.javainuse.com/misc/apache-kafka-hello-world

    【讨论】:

    • 我会试试这个谢谢
    • 我尝试了 agin 和 agin 但同样的问题
    • [2021-10-13 13:56:00,400] 信息 [ZooKeeperClient Kafka 服务器] 等待连接。 (kafka.zookeeper.ZooKeeperClient)
    • [2021-10-13 13:56:00,413] 信息打开与服务器 localhost/0:0:0:0:0:0:0:1:2181 的套接字连接。 (org.apache.zookeeper.ClientCnxn)[2021-10-13 13:56:00,414] INFO SASL 配置状态:不会尝试使用 SASL 进行身份验证(未知错误)(org.apache.zookeeper.ClientCnxn)[2021-10 -13 13:56:02,461] 警告会话 0x0 用于服务器 localhost/0:0:0:0:0:0:0:1:2181,正在关闭套接字连接。尝试重新连接,但它是 SessionExpiredException。 (org.apache.zookeeper.ClientCnxn) java.net.ConnectException:连接被拒绝:没有更多信息
    • ' 错误 KafkaServer 启动期间出现致命错误。准备关机(kafka.server.KafkaServer)'
    猜你喜欢
    • 2012-06-16
    • 2017-02-21
    • 1970-01-01
    • 2019-10-06
    • 2011-05-23
    • 2012-04-12
    • 2019-05-13
    • 2017-07-08
    • 2021-01-19
    相关资源
    最近更新 更多