阿里雲上部署kafka--遇到的坑

weixin_34162629發表於2017-08-16

阿里雲防火牆關閉,並且配置規則。不然會導致訪問不到服務。

問題一: 
Caused by: java.net.UnknownHostException: iZuf68tztea6l5ccdz7wemZ: iZuf68tztea6l5ccdz7wemZ: Name or service not known

vi /etc/hosts
127.0.0.1 iZuf68tztea6l5ccdz7wemZ

iZuf68tztea6l5ccdz7wemZ 自己的主機名

問題二: 
ERROR Error when sending message to topic test with key: null, value: 3 by 
tes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) 
org.apache.kafka.common.errors.TimeoutException: Batch containing 2 record(s) expired due to timeout 
while requesting metadata from brokers for test-0

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0
port=9092
host.name=阿里雲內網地址
advertised.host.name=阿里雲外網對映地址

原文:http://blog.csdn.net/atyz123/article/details/76690939
幫忙解決了第一個問題,感謝原作者,也留給碰到同樣問題的朋友。

相關文章