1. 程式人生 > >阿里雲伺服器部署kafka

阿里雲伺服器部署kafka

參照:https://blog.csdn.net/jshayzf/article/details/80186367

 

遇到的問題:

啟動broker時報錯 Broker may not be available

1、etc/hosts下新增內外網IP到機器hostname的對映

2、修改 kafka目錄下config/server.properties

broker.id=0
port=9092
host.name=機器內網ip

listeners=PLAINTEXT://機器外網ip:9092

advertised.listeners=PLAINTEXT://機器外網ip:9092