Getting error while starting kafka-connect

372 views
Skip to first unread message

Shivansh Maheshwari

unread,
Sep 29, 2022, 6:41:16 AM9/29/22
to debezium
I'm facing this error while restarting KC process.
[ERROR] 2022-09-19 09:44:17,908 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:219 - Failed due to error: Aborting snapshot due to error when last running 'SHOW MASTER STATUS': java.util.concurrent.Execution
Exception: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
org.apache.kafka.connect.errors.ConnectException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241)
        at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218)
        at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:846)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: io.debezium.relational.history.DatabaseHistoryException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at io.debezium.relational.history.KafkaDatabaseHistory.storeRecord(KafkaDatabaseHistory.java:262)
        at io.debezium.relational.history.AbstractDatabaseHistory.record(AbstractDatabaseHistory.java:73)
        at io.debezium.relational.history.AbstractDatabaseHistory.record(AbstractDatabaseHistory.java:66)
        at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:378)
        at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:495)
        ... 3 more
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:98)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:67)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30)
        at io.debezium.relational.history.KafkaDatabaseHistory.storeRecord(KafkaDatabaseHistory.java:250)
        ... 7 more
Caused by: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.


This is my KC config - 

{
    "connector.class": "io.debezium.connector.mysql.MySqlConnector",
    "snapshot.locking.mode": "none",
    "database.history.kafka.topic": "R3D3-MYSQL-DEVX_APPLICATION-CONNECT-HISTORY",
    "transforms": "route",
    "database.history.consumer.ssl.truststore.password": "<pswd>",
    "database.history.consumer.security.protocol": "SSL",
    "database.history.producer.ssl.keystore.password": "<pswd>",
    "database.history.consumer.ssl.keystore.password": "<pswd>",
    "database.history.consumer.ssl.truststore.location": "/opt/r3d3/certificates/kafka.client.truststore.jks",
    "include.schema.changes": "false",
    "table.whitelist": "<list of schema.table>",
    "database.history.producer.ssl.keystore.location": "/opt/r3d3/certificates/kafka.client.keystore.jks",
    "transforms.route.eventSourceType": "RDBMS",
    "transforms.route.type": "com.argon.data.ingestion.adaptor.debezium.mysql.tranformation.CDCMysqlDebeziumEventConverter$Value",
    "database.enabledTLSProtocols": "TLSv1.2",
    "transforms.route.datasetname.field": "devx_application",
    "transforms.route.shardId.field": "devx_application",
    "database.history.kafka.recovery.poll.interval.ms": "1000",
    "transforms.route.source.field": "AWS-WEST-2",
    "database.whitelist": "application",
    "database.ssl.truststore.iscreate": "true",
    "database.history.consumer.bootstrap.servers": "broker1a.data-lake-prd.a.argon.com:9092",
    "database.user": "<usr>",
    "database.server.id": "1",
    "database.history.producer.security.protocol": "SSL",
    "database.history.kafka.bootstrap.servers": "broker1a.data-lake-prd.a.argon.com:9092",
    "database.history.producer.ssl.truststore.location": "/opt/r3d3/certificates/kafka.client.truststore.jks",
    "database.history.consumer.ssl.keystore.location": "/opt/r3d3/certificates/kafka.client.keystore.jks",
    "database.server.name": "devx_application",
    "internal.database.history.ddl.filter": "DROP TEMPORARY TABLE IF EXISTS .+ /\\* generated by server \\*/,FLUSH RELAY LOGS.*,flush relay logs.*,INSERT INTO mysql.*,DELETE FROM mysql.*,SHOW CREATE TABLE mysql.*",
    "transforms.route.configFilePath.field": "/opt/r3d3/kafka-connect/config/common.properties",
    "database.ssl.truststore.password": "<pswd>",
    "transforms.route.sourceToGenericSchemaMapping.field": "eventid:#seqno#fragno, seqno:file, fragno:pos, schema:db, serverid:server_id, table:table,timestamp:ts_ms,servername:server_id",
    "database.port": "3306",
    "database.ssl.truststore": "/opt/r3d3/certificates/sr.client.truststore.jks",
    "database.ssl.mode": "required",
    "database.history.producer.ssl.truststore.password": "<pswd>",
    "database.history.producer.bootstrap.servers": "broker1a.data-lake-prd.a.argon.com:9092,broker1b.data-lake-prd.a.argon.com:9092,broker1c.data-lake-prd.a.argon.com:9092,broker2a.data-lake-prd.a.argon.com:9092,broker2b.data-lake-prd.a.argon.com:9092,broker2c.data-lake-prd.a.argon.com:9092",
    "database.hostname": "<host>",
    "database.password": "<pwd>",
    "name": "r3d3-connector-debezium-devx_application-109",
    "snapshot.mode": "schema_only"
}

Shivansh Maheshwari

unread,
Sep 29, 2022, 6:42:16 AM9/29/22
to debezium
[INFO ] 2022-09-19 09:44:16,949 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:906 - Step 5: read binlog position of MySQL primary server
[INFO ] 2022-09-19 09:44:16,953 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:918 -      using binlog 'mysql-bin-changelog.000115' at position '16293998' and gtid ''
[INFO ] 2022-09-19 09:44:16,953 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:494 - Step 6: generating DROP and CREATE statements to reflect current database schemas:
[WARN ] 2022-09-19 09:44:17,892 kafka-producer-network-thread | r3d3-connector-debezium-devx_application-109-dbhistory  org.apache.kafka.common.protocol.Errors:400 - Unexpected error code: 87.
[INFO ] 2022-09-19 09:44:17,893 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:754 - Step 7: rolling back transaction after abort
[ERROR] 2022-09-19 09:44:17,908 debezium-mysqlconnector-devx_application-snapshot  io.debezium.connector.mysql.SnapshotReader:219 - Failed due to error: Aborting snapshot due to error when last running 'SHOW MASTER STATUS': java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.

org.apache.kafka.connect.errors.ConnectException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241)
        at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218)
        at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:846)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: io.debezium.relational.history.DatabaseHistoryException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at io.debezium.relational.history.KafkaDatabaseHistory.storeRecord(KafkaDatabaseHistory.java:262)
        at io.debezium.relational.history.AbstractDatabaseHistory.record(AbstractDatabaseHistory.java:73)
        at io.debezium.relational.history.AbstractDatabaseHistory.record(AbstractDatabaseHistory.java:66)
        at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:378)
        at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:495)
        ... 3 more
Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:98)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:67)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30)
        at io.debezium.relational.history.KafkaDatabaseHistory.storeRecord(KafkaDatabaseHistory.java:250)
        ... 7 more
Caused by: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
[INFO ] 2022-09-19 09:44:17,920 pool-31-thread-1  io.debezium.jdbc.JdbcConnection:945 - Connection gracefully closed
[ERROR] 2022-09-19 09:44:18,200 task-thread-r3d3-connector-debezium-devx_application-109-0  org.apache.kafka.connect.runtime.WorkerTask:179 - WorkerSourceTask{id=r3d3-connector-debezium-devx_application-109-0} Task threw an uncaught and unrecoverable exception

jiri.p...@gmail.com

unread,
Oct 4, 2022, 12:45:08 AM10/4/22
to debezium
Hi,

please verify the content of database.history.producer.bootstrap.servers - are all the DNS names involved resolvable?

J.

Shivansh Maheshwari

unread,
Oct 4, 2022, 7:37:48 PM10/4/22
to debe...@googlegroups.com
Hi,

Yes I’ve verified all the DNS names in database.history.producer.bootstrap.servers are resolvable.

Shivansh 

--
You received this message because you are subscribed to a topic in the Google Groups "debezium" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/debezium/sk_nsVBl4TU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/0f2b4b84-515a-4511-8c1f-481614f9764an%40googlegroups.com.

jiri.p...@gmail.com

unread,
Oct 5, 2022, 4:00:22 AM10/5/22
to debezium
ok, looking at JavaDoc - https://kafka.apache.org/33/javadoc/index.html?org/apache/kafka/common/errors/UnknownServerException.html

Is the Kafka Connect version compatible with Kafka broker?

J.

George H

unread,
Oct 11, 2022, 10:34:28 AM10/11/22
to debezium
Hi there,

My name is George form a recruitment consultancy in the UK.

We are recruiting for a Debezium Consultant for a remote working contract.

If you are interested or know anyone who has excellent Debezium experience please mail geo...@digisourced.com and rebecca...@recann.co.uk
Reply all
Reply to author
Forward
0 new messages