You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Robert Zilke (Jira)" <ji...@apache.org> on 2025/03/15 16:58:00 UTC
[jira] [Updated] (KAFKA-18994) Wrong configuration in docker-compose.yml example
[ https://issues.apache.org/jira/browse/KAFKA-18994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zilke updated KAFKA-18994:
---------------------------------
Description:
h3. Incorrect `docker-compose.yml` Configuration in Apache Kafka Docker Image
The `docker-compose.yml` file in [Apache Kafka's Docker Hub repository|https://hub.docker.com/r/apache/kafka] contains the following configuration:
{code:sh}
KAFKA_LISTENERS: PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 {code}
The use of `localhost` prevents external connections to the broker from outside the container.
h3. Correct Configuration
The matching "docker run" in the documentation is:
{code:java}
-e KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \ {code}
The proper configuration in the docker-compose.yml should be:
{code:sh}
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093{code}
I was unable to locate the appropriate repository to submit a pull request, so I am reporting this issue here.
Thank you for your great work!
was:
h3. Incorrect `docker-compose.yml` Configuration in Apache Kafka Docker Image
The `docker-compose.yml` file in [Apache Kafka's Docker Hub repository|https://hub.docker.com/r/apache/kafka] contains the following configuration:
{code:sh}
KAFKA_LISTENERS: PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 {code}
The use of `localhost` prevents external connections to the broker from outside the container.
h3. Correct Configuration
The proper configuration, as documented, should be:
{code:sh}
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://:9092 {code}
I was unable to locate the appropriate repository to submit a pull request, so I am reporting this issue here.
Thank you for your great work!
> Wrong configuration in docker-compose.yml example
> -------------------------------------------------
>
> Key: KAFKA-18994
> URL: https://issues.apache.org/jira/browse/KAFKA-18994
> Project: Kafka
> Issue Type: Bug
> Components: docker, documentation
> Reporter: Robert Zilke
> Priority: Minor
>
> h3. Incorrect `docker-compose.yml` Configuration in Apache Kafka Docker Image
> The `docker-compose.yml` file in [Apache Kafka's Docker Hub repository|https://hub.docker.com/r/apache/kafka] contains the following configuration:
> {code:sh}
> KAFKA_LISTENERS: PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093
> KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 {code}
> The use of `localhost` prevents external connections to the broker from outside the container.
> h3. Correct Configuration
> The matching "docker run" in the documentation is:
> {code:java}
> -e KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \ {code}
> The proper configuration in the docker-compose.yml should be:
> {code:sh}
> KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093{code}
> I was unable to locate the appropriate repository to submit a pull request, so I am reporting this issue here.
> Thank you for your great work!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)