We have Kafka Connect running a postgres connector it is pulling changes from a DB and putting them into a topic. We are getting an error
ERROR WorkerSourceTask{id=wem-postgres-source-0} Failed to flush, timed out while waiting for producer to flush outstanding 1 messages
followed by
ERROR WorkerSourceTask{id=wem-postgres-source-0} Failed to commit offsets (org.apache.kafka.connect.runtime.SourceTaskOffsetCommitter)
followed by
[2020-01-30 09:51:52,219] WARN [Producer clientId=producer-8] Error while fetching metadata with correlation id 606994 : {topicname=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
We have verified that the topic does exist, doing a describe on the topic give us this
zookeeper-1 [root@XX /bin]# ./kafka-topics --describe --zookeeper <zookeeper>:2181 --topic topicname
Topic:topicname PartitionCount:1 ReplicationFactor:3 Configs:
Topic: topicname Partition: 0 Leader: 2 Replicas: 2,3,1 Isr: 3,2,1
ERROR WorkerSourceTask{id=wem-postgres-source-0} Failed to flush, timed out while waiting for producer to flush outstanding 1 messages
and
[2020-01-30 09:51:52,219] WARN [Producer clientId=producer-8] Error while fetching metadata with correlation id 606994 : {topicname=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)
are from the same issue. Have you tried reaching your Kafka cluster or upgrading your Kafka? The latest kafka-topics
script uses broker hosts instead of ZooKeeper hosts to describe topics.
As for
ERROR WorkerSourceTask{id=wem-postgres-source-0} Failed to commit offsets (org.apache.kafka.connect.runtime.SourceTaskOffsetCommitter)
Make sure that offset.storage.topic
of your Kafka Connect has already been created in Kafka. Workers flush offsets into this topic.