0

Kafka already work good in the localhost as consumer but, when i make a consumer in a remote machine I get the next error:

[2020-02-06 11:53:22,172] ERROR Error when sending message to topic TopicTest with key: null, value: 4 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for TopicTest-0: 2325 ms has passed since batch creation plus linger time

The conection between the remote machine and the server is fine because i execute the next command and work:

bin/kafka-topics.sh --list --zookeeper my.public.ip:2181

H.Ç.T
  • 3,335
  • 1
  • 18
  • 37
Alejandro Herrera
  • 411
  • 1
  • 5
  • 22

1 Answers1

0

You should check advertised.listeners config in server.properties. If it is localhost, then you should change it to broker ip address. This answer can also helpful for you.

H.Ç.T
  • 3,335
  • 1
  • 18
  • 37