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


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

問題一: 
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
幫忙解決了第一個問題,感謝原作者,也留給碰到同樣問題的朋友。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM