kafka 异常 Exception thrown when sending a message with key='null'

kafka | 2019-09-19 09:11:14

使用java发送kafka消息异常,之前还是正常的,异常信息:

2019-09-19 08:38:27 [ERROR] [kafka-producer-network-thread | producer-1] - Exception thrown when sending a message with key='null' and payload='/tmp/

然后我使用命令行客户端试了一下也出现异常:

/kafka-console-producer.sh --broker-list slave203:6667 --topic designTopic
>s
[2019-09-19 08:56:04,747] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-09-19 08:56:04,800] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-09-19 08:56:04,953] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-09-19 08:56:05,155] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-09-19 08:56:05,562] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

之前还是正常的 好吧,这个怎么解决?

登录后即可回复 登录 | 注册
    
  • admin
    admin

    确定IP配置正确,重启kafka和zookeeper就可以了

关注编程学问公众号