Description
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)