1 year ago

#382655

test-img

Arar

Either no records were produced by the task since the last offset commit or every record has been filtered out

I'm working on a task to setup jdbc kafka connector on my local machine. I went through the setup step by step one by one:

➜  bin ./zookeeper-server-start.sh ../config/zookeeper.properties
➜  bin ./kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
➜  bin  ./connect-distributed.sh ../config/connect-distributed.properties

and ran Kafka server successfully.

Finally registered the jdbc kafka connector using curl command:

curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d '{
        "name": "jdbc_source_mysql_01",
        "config": {
                "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
                "connection.url": "jdbc:mysql://mysql:3306/neo_table”,
                "connection.user": “root”,
                "connection.password": "xxx",
                "topic.prefix": "saif-test",
                "mode":"bulk",
                "poll.interval.ms" : 3600000
                }
        }'

And finally ran the consumer:

 ➜  bin sh kafka-console-consumer.sh --topic saif-test  --bootstrap-server localhost:9092  

but consumer is sitting their idle, not printing any messages, and kafka server is printing error messages:

[2022-04-06 08:53:43,060] INFO [jdbc_source_mysql_01|task-0|offsets] WorkerSourceTask{id=jdbc_source_mysql_01-0} Either no records were produced by the task since the last offset commit, or every record has been filtered out by a transformation or dropped due to transformation or conversion errors. (org.apache.kafka.connect.runtime.WorkerSourceTask:484)

➜  bin sh kafka-topics.sh --bootstrap-server=localhost:9092 --list
__consumer_offsets
connect-configs
connect-offsets
connect-status
neo_table
neo_tableneo_table
neo_tablesys_config
quickstart-events
saif-test
saif-testneo_table
saif-testsys_config  

mysql

jdbc

apache-kafka

apache-kafka-connect

0 Answers

Your Answer

Accepted video resources