CentOS 7.9 安装 kafka_2.13( 二 )


CentOS 7.9 安装 kafka_2.13

文章插图
2 节点响应超时(请求超时)
[2022-10-13 01:11:34,670] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/192.168.0.92:8092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)[2022-10-13 01:11:37,676] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/192.168.0.92:8092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)[2022-10-13 01:11:40,682] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/192.168.0.92:8092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)Error while executing topic command : Timed out waiting for a node assignment. Call: createTopics[2022-10-13 01:11:43,600] ERROR org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: createTopics (kafka.admin.TopicCommand$)该错误是由于没有用对应版本的命令,访问了错的主机名(或IP)和端口,所以请求失败导致超时 。
其中的createTopics、listTopics等都会出现该错误 。如果没配置server.properties文件的listeners值,也会报以上错误 。
listeners值默认是PLAINTEXT://:9092,要改为PLAINTEXT://localhost:9092或PLAINTEXT://IP:9092等
CentOS 7.9 安装 kafka_2.13

文章插图

推荐阅读