Skip to content

Fix localhost reference #164

Open
Open
@jriester

Description

@jriester

https://github.com/confluentinc/cp-all-in-one/blob/74d8bf87ad553812eba73edd051e7755e291ac00/cp-all-in-one/docker-compose.yml#L27C85-L27C91

This causes client activity on port 9092 to fail except when run from the broker node.

Should be:

KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://broker:9092

OR

KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://0.0.0.0:9092

Example of client failure which is run from schema-registry:
kafka-protobuf-console-producer --bootstrap-server broker:9092 --topic test-proto --property value.schema.id=1 --property schema.registry.url=http://schema-registry:8081/

Results in:

[2024-10-24 16:27:51,809] INFO [Producer clientId=console-producer] Node 1 disconnected. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:51,809] WARN [Producer clientId=console-producer] Connection to node 1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:51,914] INFO [Producer clientId=console-producer] Node 1 disconnected. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:51,914] WARN [Producer clientId=console-producer] Connection to node 1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:52,069] INFO [Producer clientId=console-producer] Node 1 disconnected. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:52,070] WARN [Producer clientId=console-producer] Connection to node 1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2024-10-24 16:27:52,327] INFO [Producer clientId=console-producer] Node 1 disconnected. (org.apache.kafka.clients.NetworkClient)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions