最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

docker - Not able to change advertised listener for RedPanda kafka - Stack Overflow

matteradmin6PV0评论

I have a redpanda kafka container running, where the logs show this

 brokers: {{id: 0, kafka_advertised_listeners: {{PLAINTEXT:{host: 127.0.0.1, port: 29092}}, {OUTSIDE:{host: localhost, port: 9092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 1, disk_available 58}}}}

As can be seen from the docker container logs that it is listening at localhost address. This is causing me a problem and I want it to listen at host.docker.internal.

Based on redpanda documentation here / I need to have these

redpanda:
  advertised_kafka_api:
    - address: redpanda-0.redpanda.redpanda.svc.cluster.local.
      port: 9093
      name: internal
    - address: redpanda-0.customredpandadomain.local
      port: 31092
      name: default

I also read to translate yaml to Environment config, I need to use upper case. So I am starting my container with below config but it does not seem to take effect

            "REDPANDA_ADVERTISED_KAFKA_API_ADDRESS","host.docker.internal",
            "REDPANDA_ADVERTISED_KAFKA_API_PORT","9092"
Post a comment

comment list (0)

  1. No comments so far