问题描述:ERROR Error when sending message to topic helloworld with key: null, value: 3 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
生产者:kafka-console-producer.sh --broker-list localhost:9092 --topic helloworld
消费者: kafka-console-consumer.sh --zookeeper localhost:2181 --topic helloworld --from-beginning
解决办法:将localhost改为当前broker的IP地址,不用localhost。