Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix localhost reference #164

Open
jriester opened this issue Oct 24, 2024 · 0 comments
Open

Fix localhost reference #164

jriester opened this issue Oct 24, 2024 · 0 comments

Comments

@jriester
Copy link
Member

jriester commented Oct 24, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant