Invalid value java.sql.SQL Exception: No suitable driver found for jdbc:mysql://mysqldb-1:3306

676 views
Skip to first unread message

John Raikou

unread,
Apr 24, 2018, 4:47:52 PM4/24/18
to Confluent Platform
Ok, so its the standard connector configuration issue's many have had but this is where I'm stumped.

My error:

  "error_code": 400,
  "message": "Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://mysqldb-1:3306 for configuration Couldn't open connection to jdbc:mysql://mysqldb-1:3306\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://mysqldb-1:3306 for configuration Couldn't open connection to jdbc:mysql://mysqldb-1:3306\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"


My setup is a training cluster on my google cloud,  I have 3 zookeeper servers and 3 Kafka servers and a single mysql server running Server version: 5.7.21 MySQL Community Server (GPL).

At first I used the Confluent open source version and had the same issue but I downloaded the mysql connector jar file and put if in the  /usr/share/java/kafka-connect-jdbc and it worked. I was off to the races testing and moving data out into topics.

my config was the one in the blog as i was following the examples. With of course my connection info.

I then decided to give the latest version of confluent enterprise a try with KSQL.  So I re-created with three new kafka servers and zookeeper servers.

In preparation, this time I downloaded the mysql jar and moved it to the correct spot and I recived the above error. So I researched the search again as I did fix it before but no such luck.  I noticed that the version of the mysql connector was not the same I pulle down version 5.1.46 when my other setup was running 5.1.39.  

So I copied that version over and laoded my connecter, and it worked... for about 65 dummy inserts.  The next day when I started up my cluster again i noticed the mysql connector was stopped and not working.. after i uloaded and deleted it and tried to start it again I started to get the error again.

So its been a few days and many hours googling and testign with no luck.

On a side note.  When I try and use the GUI in the control center to create this connecter it gets the to the final your connection looks good but the "Save and Finish" button does nothing. No messages, I would have expected a error logged somewhere. Using that config it generates when used at the commandline created the same error once again.

Has anyone had this type of problem?

Thanks in advance.

john

Kuldeep Poonia (Software Developer-Info. Technology, HO)

unread,
Apr 27, 2018, 6:47:05 AM4/27/18
to Confluent Platform
Hi John,

I was facing the same problem after upgrading version to 4.1.0. I resolved the error by adding plugin.path=share/java in my connectors. Hope this will help you.

John Raikou

unread,
Apr 29, 2018, 1:35:26 PM4/29/18
to Confluent Platform
yeah.. still not resolved.  I rebuilt it again from scratch and used the Connector/J 8.0.11 driver in the /usr/share/java is my plugin.path and even registered the location in my classpath and still getting the same error.

I may take snapshots of my working open source cluster drives and see if I upgrade to the enterprise version will it still work or will it break.

What JDBC driver are you using from MYSQL.

when you indicated your including the plugin.path in the connectors are you including that as extra parameters in each connector you config?

Regards,

John

Kuldeep Poonia (Software Developer-Info. Technology, HO)

unread,
Apr 30, 2018, 2:32:22 AM4/30/18
to Confluent Platform
Hi John,

I am using SQL Server instead of MySQL. I did following step to resolve this problem

1. I simply copied sql driver lib to /home/<my  user name>/confluent-4.1.0/share/java.

2. In my source connector I added plugin.path=share/java.

John Raikou

unread,
Apr 30, 2018, 10:32:51 AM4/30/18
to Confluent Platform
Thanks Kuldeep,  I'll play around with adding that path in a connector today but since we are connecting to different databases and I already have my files in the correct path I don't think it will work. 

On another note.  The Open source version 4.0 that worked fine stopped working once I upgraded to the enterprise version 4.1.

That seemed very strange since I did not change any of my JDBC drivers in the upgrade. I expected that it would have been able to register the connector and pull data.

Maybe I found an undocumented bug.

John

sn1...@gmail.com

unread,
Jul 6, 2018, 6:01:48 AM7/6/18
to Confluent Platform
John,
Did you manage to fix this issue with v4.1 and mysql?

Thanks,
Twarit

John Raikou

unread,
Jul 25, 2018, 4:18:48 PM7/25/18
to Confluent Platform
No same old crap... I did build a new instance today to test a POC and when I tried to connect once again and followed the same instructions from  


..  and once again same connection problems.

Robin Moffatt

unread,
Jul 26, 2018, 6:33:10 AM7/26/18
to confluent...@googlegroups.com
MySQL works fine with the JDBC connector… but I realise that doesn't help those who are having problems configuring it :) 

The blog you reference is based on a single-machine install, whereas the thread from April you mention having three machines - so the instructions won't be applicable, particularly given that Confluent CLI is for a single-node dev instance only. 

If you'd like to post your current setup, steps you've taken and error you've got, let's take another crack at getting this working for you :) 

thanks, Robin


-- 

Robin Moffatt | Developer Advocate | ro...@confluent.io | @rmoff



--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/821b70d6-3654-40c9-bab5-0e46db80cadc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Max Li

unread,
Apr 5, 2019, 1:24:38 PM4/5/19
to Confluent Platform
Hi Robin,

I am new to the confluent kafka and follow your link, https://www.confluent.io/blog/simplest-useful-kafka-connect-data-pipeline-world-thereabouts-part-1/, on the single machine server, 

when I run "bin/confluent load jdbc_source_mysql_foobar_01 -d dba/kafka-connect-jdbc-source.json"

got the following error,

{
  "error_code": 400,
  "message": "Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://houbiap5.oii.oceaneering.com:3306/demo?user=rmoff&password=pw for configuration Couldn't open connection to jdbc:mysql://houbiap5.oii.oceaneering.com:3306/demo?user=rmoff&password=pw\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://houbiap5.oii.oceaneering.com:3306/demo?user=rmoff&password=pw for configuration Couldn't open connection to jdbc:mysql://houbiap5.oii.oceaneering.com:3306/demo?user=rmoff&password=pw\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
}

I downloaded the mysql jdbc jar file mysql-connector-java-8.0.15.jar and copy it into share/java/kafka-connect-jdbc
ls share/java/kafka-connect-jdbc
audience-annotations-0.5.0.jar  jline-0.9.94.jar  kafka-connect-jdbc-5.2.1.jar     netty-3.10.6.Final.jar          slf4j-api-1.7.25.jar    zkclient-0.10.jar
common-utils-5.2.1.jar          jtds-1.3.1.jar    mysql-connector-java-8.0.15.jar  postgresql-9.4-1206-jdbc41.jar  sqlite-jdbc-3.25.2.jar  zookeeper-3.4.13.jar

Can you please advise ? thanks a lot!
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.

Max Li

unread,
Apr 5, 2019, 1:35:51 PM4/5/19
to Confluent Platform
never mind, i fixed it

Kris

unread,
Apr 6, 2019, 2:56:06 AM4/6/19
to Confluent Platform
Can you provide the fix so others can learn from it as well. Thanks!

Steve Howard

unread,
Apr 6, 2019, 8:14:41 AM4/6/19
to confluent...@googlegroups.com
Hi Max,

Did you restart connect after copying the driver into the directory?

Thanks,

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/dc0358fe-1205-4a09-a4c3-01139b416e04%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages