I have a setup a local kafka node that I want to open to the open world.
I have seen this question which seems very similar. I have opened that port using the advertised listeners to localhost:9092
and I opened that port the node, but when I'm trying to produce a message using kafkajs
I get the following error :
{"level":"ERROR","timestamp":"2021-06-01T13:49:35.225Z","logger":"kafkajs","message":"[Connection] Connection error: connect EHOSTUNREACH 13.36.134.166:9092","broker":"13.36.134.166:9092","clientId":"my-app","stack":"Error: connect EHOSTUNREACH 13.36.134.166:9092\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1054:14)"}
Am I missing a big step here ? Is using localhost
to designate the advertised port ?
Many thanks ! Kev.