0

I am new to ubuntu server and Kafka. Kafka is running in a docker container. Hence, I need to change the default localhost to the machine's ip. Looking to update an env variable.

export  KAFKA_ADVERSITED_HOST-kafka = 192.168.1.56

even tried with quotes.

export KAFKA_ADVERSITED_HOST-kafka = "192.168.1.56"

I get not a valid identifier. Some on you might think that the hypen is wrong but it was there already in the java package when I checked it out.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Nesan Mano
  • 1,892
  • 2
  • 26
  • 43
  • What's your question? It's not a valid identifier due to the hyphen. Does Kafka require it to include a hyphen? I'm not familiar with it myself. Check out [How to ask a good question](/help/how-to-ask) – wjandrea Sep 20 '22 at 17:02
  • The property `advertised.host.name` in Kafka is deprecated, so don't use it, and `name` is not something you can change anyway, that is a hard-coded property key. You should use `KAFKA_ADVERTISED_LISTENERS`, but please read the duplicate post... This has nothing to do with Ubuntu, and answer is the same on any machine running Docker. – OneCricketeer Sep 21 '22 at 22:23

0 Answers0