kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jagannath Bilgi <jsbi...@yahoo.com.INVALID>
Subject Re: Kafka-Connect : Invalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/connect_test
Date Tue, 01 May 2018 17:03:10 GMT
Thank you Ted,
Gone through the link and removed the custom CONNECT_PLUGIN_PATH. Now getting below error.
Executed below commands in same sequence for creating connector and jdbc.

1)docker run -d \  --name=kafka-connect-avro \  --net=host \  -e CONNECT_BOOTSTRAP_SERVERS=localhost:29092
\  -e CONNECT_REST_PORT=28083 \  -e CONNECT_GROUP_ID="quickstart-avro" \  -e CONNECT_CONFIG_STORAGE_TOPIC="quickstart-avro-config"
\  -e CONNECT_OFFSET_STORAGE_TOPIC="quickstart-avro-offsets" \  -e CONNECT_STATUS_STORAGE_TOPIC="quickstart-avro-status"
\  -e CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR=1 \  -e CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR=1
\  -e CONNECT_STATUS_STORAGE_REPLICATION_FACTOR=1 \  -e CONNECT_KEY_CONVERTER="io.confluent.connect.avro.AvroConverter"
\  -e CONNECT_VALUE_CONVERTER="io.confluent.connect.avro.AvroConverter" \  -e CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL="http://localhost:8081"
\  -e CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL="http://localhost:8081" \  -e CONNECT_INTERNAL_KEY_CONVERTER="org.apache.kafka.connect.json.JsonConverter"
\  -e CONNECT_INTERNAL_VALUE_CONVERTER="org.apache.kafka.connect.json.JsonConverter" \ 
-e CONNECT_REST_ADVERTISED_HOST_NAME="localhost" \  -e CONNECT_LOG4J_ROOT_LOGLEVEL=DEBUG
\  -e CONNECT_LOG4J_LOGGERS=org.reflections=ERROR \  -v /tmp/quickstart/file:/tmp/quickstart
\  -v /tmp/quickstart/jars:/etc/kafka-connect/jars \  confluentinc/cp-kafka-connect:latest
2)export CONNECT_HOST="192.168.99.100"
3)docker exec kafka-connect-avro mkdir -p /tmp/quickstart/jars
4)docker exec -it kafka-connect-avro bash

5)curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.39.tar.gz"
| tar -xzf - -C /tmp/quickstart/jars --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-5.1.39-bin.jar

6)curl -X POST \  -H "Content-Type: application/json" \  --data '{ "name": "quickstart-jdbc-source",
"config": { "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector", "tasks.max":
1, "connection.url": "jdbc:mysql://127.0.0.1:3306/connect_test?user=root&password=confluent",
"mode": "incrementing", "incrementing.column.name": "id", "timestamp.column.name": "modified",
"topic.prefix": "quickstart-jdbc-", "poll.interval.ms": 1000 } }' \  http://192.168.99.100:28083/connectors
Error response
{"error_code":500,"message":"Failed to find any class that implements Connector and which
name matches io.confluent.connect.jdbc.JdbcSourceConnector, available connectors are: PluginDesc{klass=class
org.apache.kafka.connect.file.FileStreamSinkConnector, name='org.apache.kafka.connect.file.FileStreamSinkConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=sink, typeName='sink', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSourceConnector, name='org.apache.kafka.connect.file.FileStreamSourceConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=source, typeName='source', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=connector,typeName='connector', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=sink, typeName='sink', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=source, typeName='source', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=source, typeName='source', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=source, typeName='source', location='classpath'},
PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector',
version='1.1.0-cp1', encodedVersion=1.1.0-cp1, type=source, typeName='source', location='classpath'}"}

Tried step 6 from host or as well as container. However in both case it failed with above
error message

Thanks and regards
Jagannath S Bilgi
 

    On Tuesday, May 1, 2018, 9:12:05 PM GMT+5:30, Ted Yu <yuzhihong@gmail.com> wrote:
 
 
 Have you seen this thread ?

https://stackoverflow.com/questions/49433199/kafka-connect-jdbc-source-connector-not-working-for-microsoft-sql-server

On Tue, May 1, 2018 at 5:52 AM, Jagannath Bilgi <jsbilgi@yahoo.com.invalid>
wrote:

> Hi Team,
> Getting subject error message while trying to  create Kafka-JDBC
> connector. Able to execute initial steps successfully from Kafka Connect
> Tutorial — Confluent Platform
> However it fails on executing below command.
> curl -X POST  -H "Content-Type: application/json"  --data '{ "name":
> "quickstart-jdbc-source", "config": { "connector.class":
> "io.confluent.connect.jdbc.JdbcSourceConnector", "tasks.max": 1,
> "connection.url": "jdbc:mysql://127.0.0.1:3306/
> connect_test?user=confluent&password=confluent", "mode": "incrementing", "
> incrementing.column.name": "id", "timestamp.column.name": "modified",
> "topic.prefix": "quickstart-jdbc-", "poll.interval.ms": 1000 } }'
> http://192.168.99.100:28082/connectors
> Error message
> {"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://127.0.0.1:3306/
> connect_test?user=confluent&password=confluent for configuration Couldn't
> open connection to jdbc:mysql://127.0.0.1:3306/
> connect_test?user=confluent&password=confluent\nInvalid value
> java.sql.SQLException: No suitable driver found for jdbc:mysql://
> 127.0.0.1:3306/connect_test?user=confluent&password=confluent for
> configuration Couldn't open connection to jdbc:mysql://127.0.0.1:3306/
> connect_test?user=confluent&password=confluent\nYou can also find the
> above list of errors at the endpoint `/{connectorType}/config/
> validate`"}root@default:/#
> Please advise over come the issue.
> Thanks and regards
> Jagannath S Bilgi
>  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message