Why I cannot connect to Kafka from outside?

前端 未结 8 1992
梦毁少年i
梦毁少年i 2020-12-02 14:19

I am running kafka on ec2 instance. So amazon ec2 instance has two ips one is internal ip and second one is for external use.

I created producer from local machine,

8条回答
  •  一整个雨季
    2020-12-02 14:50

    SSH to your EC2 instance or wheverver you're hosting Kafka.

    sudo nano /etc/hosts

    Add:

    127.0.0.1 localhost

    In my case it's:

    127.0.0.1 ec2-12-34-56-78.ap-southeast-1.compute.amazonaws.com

    Save and exit.

提交回复
热议问题