Control Center: "No Suitable Driver found..." using PostgreSQL

727 views
Skip to first unread message

bg

unread,
Aug 22, 2016, 7:38:34 PM8/22/16
to Confluent Platform
Trying to create a Jdbc Source in Confluent Control Center and I am getting the following error "Invalid value Java.SqlException: No suitable driver found for <url>" when using a PostgreSQL URL:


I've seen this error when the JDBC driver is not installed/in class path for SQLServer, but I thought PostgreSQL was supported by default?


"Note You can use your favorite database instead of SQLite. Follow the same steps, but adjust the connection.url setting for your database. Confluent Platform includes JDBC drivers for SQLite and PostgreSQL, but if you’re using a different database you’ll also need to make sure the JDBC driver is available on the Kafka Connect process’s CLASSPATH."

Gwen Shapira

unread,
Aug 22, 2016, 7:48:40 PM8/22/16
to confluent...@googlegroups.com
Looking at our pom file, we have postgres as a runtime dependency:
https://github.com/confluentinc/kafka-connect-jdbc/blob/master/pom.xml#L90

Looking at our tarball, share/java/kafka-connect-jdbc/ has the
postgres jar in there...

Can you share how you installed Confluent Platform? and maybe your classpath?

Gwen
> --
> 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/23bae336-99ce-4188-8564-67bfa7ed0d4d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gwen Shapira
Product Manager | Confluent
650.450.2760 | @gwenshap
Follow us: Twitter | blog

bg

unread,
Aug 22, 2016, 7:50:40 PM8/22/16
to Confluent Platform
Using the confluent quickstart guide:


What do I need to add to my classpath?

bg

unread,
Aug 22, 2016, 7:52:10 PM8/22/16
to Confluent Platform
Oops. More specifically, I installed using the wget/unzip option.

Gwen Shapira

unread,
Aug 22, 2016, 8:04:09 PM8/22/16
to confluent...@googlegroups.com
You should have a postgres jar in ./share/java/kafka-connect-jdbc
(relative to wherever you unzipped)
Can you double check it is there?

Also, when you start connect, it may have printed the classpath to its
log file - we expect share/java/* or something similar?

Gwen
>>> > 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/23bae336-99ce-4188-8564-67bfa7ed0d4d%40googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> Gwen Shapira
>>> Product Manager | Confluent
>>> 650.450.2760 | @gwenshap
>>> Follow us: Twitter | blog
>
> --
> 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/3ee8141f-0b90-4150-aec5-335690822ec8%40googlegroups.com.

bg

unread,
Aug 22, 2016, 8:15:06 PM8/22/16
to Confluent Platform

I start connect using a shell script that runs the following:


!/bin/bash


nohup ./bin/connect-distributed connect-distributed.properties > connect.out 2>&1 &

sleep 2



#kill `jps | grep "ConnectDistributed" | cut -d " " -f 1`


Here are the contents of connect.out:


WARNING: The following warnings have been detected: WARNING: The (sub)resource method listConnectorPlugins in org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource contains empty path annotation.

WARNING: The (sub)resource method listConnectors in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.

WARNING: The (sub)resource method createConnector in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.

WARNING: The (sub)resource method serverInfo in org.apache.kafka.connect.runtime.rest.resources.RootResource contains empty path annotation.


[2016-08-23 00:13:18,672] INFO Started o.e.j.s.ServletContextHandler@614b3189{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler:744)

[2016-08-23 00:13:18,683] INFO Started ServerConnector@45636429{HTTP/1.1}{0.0.0.0:8083} (org.eclipse.jetty.server.ServerConnector:266)

[2016-08-23 00:13:18,683] INFO Started @2867ms (org.eclipse.jetty.server.Server:379)

[2016-08-23 00:13:18,684] INFO REST server listening at http://10.0.2.15:8083/, advertising URL http://10.0.2.15:8083/ (org.apache.kafka.connect.runtime.rest.RestServer:150)

[2016-08-23 00:13:18,684] INFO Kafka Connect started (org.apache.kafka.connect.runtime.Connect:58)



I don't see it being loggged. Where is it set?

>>> > 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/23bae336-99ce-4188-8564-67bfa7ed0d4d%40googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> Gwen Shapira
>>> Product Manager | Confluent
>>> 650.450.2760 | @gwenshap
>>> Follow us: Twitter | blog
>
> --
> 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

Gwen Shapira

unread,
Aug 22, 2016, 8:16:08 PM8/22/16
to confluent...@googlegroups.com
if you edit ./bin/connect-distributed - you'll see we are setting a
class path in the line before last. you can just echo it :)
>> >>> > 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/23bae336-99ce-4188-8564-67bfa7ed0d4d%40googlegroups.com.
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Gwen Shapira
>> >>> Product Manager | Confluent
>> >>> 650.450.2760 | @gwenshap
>> >>> Follow us: Twitter | blog
>> >
>> > --
>> > 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/3ee8141f-0b90-4150-aec5-335690822ec8%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Gwen Shapira
>> Product Manager | Confluent
>> 650.450.2760 | @gwenshap
>> Follow us: Twitter | blog
>
> --
> 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/fde587f4-338e-4fb6-955c-fa5a7eff8f27%40googlegroups.com.

bg

unread,
Aug 22, 2016, 8:48:51 PM8/22/16
to Confluent Platform
Oh. My bad.

My CLASSPATH is indeed empty:

echo $CLASSPATH returns blank.
>> >>> > 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/23bae336-99ce-4188-8564-67bfa7ed0d4d%40googlegroups.com.
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Gwen Shapira
>> >>> Product Manager | Confluent
>> >>> 650.450.2760 | @gwenshap
>> >>> Follow us: Twitter | blog
>> >
>> > --
>> > 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
>> > 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/3ee8141f-0b90-4150-aec5-335690822ec8%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Gwen Shapira
>> Product Manager | Confluent
>> 650.450.2760 | @gwenshap
>> Follow us: Twitter | blog
>
> --
> 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

bg

unread,
Aug 23, 2016, 2:25:56 PM8/23/16
to Confluent Platform
Hi, 

Is there any particular reason why my claspath would not be set correctly? I open the file and hardcode the classpath to include ~/confluent/share/java and restart connect and control center still gives me this error. 

Thanks!
Reply all
Reply to author
Forward
0 new messages