Debezium Mysql Connector Error

ERROR Failed testing connection for jdbc:mysql://localhost:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useSSL=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user 'shubham' (io.debezium.connector.mysql.MySqlConnector:103)
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
	at io.debezium.jdbc.JdbcConnection.lambda$patternBasedFactory$1(JdbcConnection.java:231)
	at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:872)
	at io.debezium.connector.mysql.MySqlConnection.connection(MySqlConnection.java:79)
	at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:867)
	at io.debezium.jdbc.JdbcConnection.connect(JdbcConnection.java:413)
	at io.debezium.connector.mysql.MySqlConnector.validateConnection(MySqlConnector.java:98)
	at io.debezium.connector.common.RelationalBaseSourceConnector.validate(RelationalBaseSourceConnector.java:52)
	at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:378)
	at org.apache.kafka.connect.runtime.AbstractHerder.lambda$validateConnectorConfig$1(AbstractHerder.java:326)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
[2021-04-28 00:21:54,670] INFO AbstractConfig values: 
 (org.apache.kafka.common.config.AbstractConfig:361)
[2021-04-28 00:21:54,677] ERROR Failed to create job for etc/mysql-properties/mysql.properties (org.apache.kafka.connect.cli.ConnectStandalone:110)
[2021-04-28 00:21:54,677] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:121)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):
Unable to connect: Public Key Retrieval is not allowed
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
	at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:115)
	at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:99)
	at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:118)
Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):
Unable to connect: Public Key Retrieval is not allowed
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
	at org.apache.kafka.connect.runtime.AbstractHerder.maybeAddConfigErrors(AbstractHerder.java:617)
	at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:215)
	at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.lambda$null$1(StandaloneHerder.java:201)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
[2021-04-28 00:21:54,678] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:67)
[2021-04-28 00:21:54,678] INFO Stopping REST server (org.apache.kafka.connect.runtime.rest.RestServer:332)
[2021-04-28 00:21:54,700] INFO Stopped http_8083@47cdf8ff{HTTP/1.1, (http/1.1)}{0.0.0.0:8083} (org.eclipse.jetty.server.AbstractConnector:381)
[2021-04-28 00:21:54,701] INFO node0 Stopped scavenging (org.eclipse.jetty.server.session:149)
[2021-04-28 00:21:54,702] INFO REST server stopped (org.apache.kafka.connect.runtime.rest.RestServer:349)
[2021-04-28 00:21:54,702] INFO Herder stopping (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:102)
[2021-04-28 00:21:54,703] INFO Worker stopping (org.apache.kafka.connect.runtime.Worker:215)
[2021-04-28 00:21:54,703] INFO Stopped FileOffsetBackingStore (org.apache.kafka.connect.storage.FileOffsetBackingStore:66)
[2021-04-28 00:21:54,703] INFO Metrics scheduler closed (org.apache.kafka.common.metrics.Metrics:668)
[2021-04-28 00:21:54,703] INFO Closing reporter org.apache.kafka.common.metrics.JmxReporter (org.apache.kafka.common.metrics.Metrics:672)
[2021-04-28 00:21:54,704] INFO Metrics reporters closed (org.apache.kafka.common.metrics.Metrics:678)
[2021-04-28 00:21:54,704] INFO App info kafka.connect for 127.0.1.1:8083 unregistered (org.apache.kafka.common.utils.AppInfoParser:83)
[2021-04-28 00:21:54,704] INFO Worker stopped (org.apache.kafka.connect.runtime.Worker:236)
[2021-04-28 00:21:54,706] INFO Herder stopped (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:120)
[2021-04-28 00:21:54,706] INFO Kafka Connect stopped (org.apache.kafka.connect.runtime.Connect:72)

This is my error log. I am trying to implement simple Mysql source connector where mysql is running on localhost.

connector.class=io.debezium.connector.mysql.MySqlConnector
name=employee-connector
database.hostname=localhost
database.port=3306
database.user=shubham
database.password=******
database.server.id=18406
database.server.name=xyz
database.include.list=Employee
database.history.kafka.bootstrap.servers=localhost:9092
database.history.kafka.topic=schema-changes.Employee
table.include.list=Employeee.EmpData
tasks.max=1

This is my source connector.properties file. Am I missing something?
Thanks in advance

@shubhamshirur does this blog from Robin help?

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.