Docker Community Forums

Share and learn in the Docker community.

Unable to send Kafka messages from localhost to Docker Cloud Kafka service

docker

(Rahulmalimpf) #1

I am facing issue while sending Kafka messages from my local machine to Docker cloud Kafka service.
Following warning on localhost:
"WARN Connection to node 0 could not be established. Broker may not be available.org.apache.kafka.clients.NetworkClient"
Exception on localhost:
ERROR Error when sending message to topic testraul with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for testraul-0: 1519 ms has passed since batch creation plus linger time

Environment Details:
Docker Cloud: Kafka service is up and running with one container. Service end points are published and available.
To make Kafka container or service accessible from outside we set Listeners value to "0.0.0.0:9092"
Localhost: Kafka management console is present and I am using same to produce and consume messages.

In producer and consumer scripts I am using docker cloud service IP for broker list.