confluentinc / demo-scene

👾Scripts and samples to support Confluent Demos and Talks. ⚠️Might be rough around the edges ;-) 👉For automated tutorials and QA'd code, see https://github.com/confluentinc/examples/
https://developer.confluent.io
Apache License 2.0
1.5k stars 896 forks source link

Getting 500 response : "Failed to find any class that implements Connector" when trying to create kafka connector. #186

Closed smarty1palak closed 3 years ago

smarty1palak commented 3 years ago

Hi, I am facing an issue while creating a Kafka connector. The complete error is as below: "error_code" : 500, "message" : "Failed to find any class that implements Connector and which name matches io.confluent.connect.jdbc.JdbcSinkConnector, available connectors are: ....... Can someone please help to resolve this. Thanks in advance.

rmoff commented 3 years ago

Which demo are you trying to run?

smarty1palak commented 3 years ago

Hi @rmoff I am trying to run kafka-to-database.

rmoff commented 3 years ago

The Docker Compose installs the connector at runtime - can you check the worker logs to see if that step completed successfully?

Also paste the output here of curl -s localhost:8083/connector-plugins|jq '.[].class'| (you'll need jq installed; if you don't have it then just the output of curl -s localhost:8083/connector-plugins)

smarty1palak commented 3 years ago

Hi, the output of the above curl command returns {"class":"org.apache.kafka.connect.file.FileStreamSinkConnector","type":"sink","version":"5.4.1-ccs"},{"class":"org.apache.kafka.connect.file.FileStreamSourceConnector","type":"source","version":"5.4.1-ccs"},{"class":"org.apache.kafka.connect.mirror.MirrorCheckpointConnector","type":"source","version":"1"},{"class":"org.apache.kafka.connect.mirror.MirrorHeartbeatConnector","type":"source","version":"1"},{"class":"org.apache.kafka.connect.mirror.MirrorSourceConnector","type":"source","version":"1"}

rmoff commented 3 years ago

The Docker Compose installs the connector at runtime - can you check the worker logs to see if that step completed successfully?

smarty1palak commented 3 years ago

Hi, thanks for your help. I was able to figure out the issue from the logs. The docker-compose.yml has curl https://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-8.0.19.tar.gz This link seems to be outdated. I changed the link to curl https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.49.tar.gz and it works. Shall I send a PR for this update?

rmoff commented 3 years ago

Glad it's working now. Yes, a PR would be great, thank you. Perhaps also include in the PR a mod to the doc to point people to check this if they're seeing the error?