Kafka - Unable to send a message to a remote server using Java

后端 未结 4 1132
轻奢々
轻奢々 2020-12-09 09:46

I\'m trying to create a Kafka cluster to send messages to a remote control. I have configured everything as described here. I am running this on a Linux r

4条回答
  •  粉色の甜心
    2020-12-09 10:05

    Tried connecting to kafka remote cluster from my local machine.

    VM's had one internal (9.0.0.1) and one external IP (192.1.1.1). I could ssh only to the internal & not the external. I did these changes to my conifg/server.properties:

    //set to the IP of the machine (find using ifconfig or hostname -I)

    listeners=PLAINTEXT://192.1.1.1:9092
    

    //set to the IP the consumer and producer will connect

    advertised.listeners=PLAINTEXT://9.0.0.1:9092  
    

提交回复
热议问题