Unable to create the JOb: org.apache.kafka.connect.runtime.rest.errors.BadRequestException

692 views
Skip to first unread message

abhilash...@yatra.com

unread,
Apr 24, 2017, 7:37:37 AM4/24/17
to Confluent Platform
Hi 

I am new to Kafka-Confluent. I need to make use of JDBCConnector for polling the data from mysql and send the the result to Kafka-Broker.
I have started the zoo-keeper, kafka broker, now I am trying to start the kafka connector using jdbc-configs.
worker-properties:
key.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schema.registry.url=http://localhost:8081
value.converter=org.apache.kafka.connect.json.JsonConverter
value.converter.schema.registry.url=http://localhost:8081
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false

# Local storage file for offset data
offset.storage.file.filename=/tmp/connect.offsets

source configs
connection.url = JDBCURL of mysql
mode=incrementing
table.whitelist=kafka_table
topic.prefix=test-sqlite-jdbc


below is the error:

[2017-04-24 16:59:45,306] INFO REST server listening at http://192.168.19.71:8083/, advertising URL http://192.168.19.71:8083/ (org.apache.kafka.connect.runtime.rest.RestServer:150)
[2017-04-24 16:59:45,307] INFO Kafka Connect started (org.apache.kafka.connect.runtime.Connect:56)
[2017-04-24 16:59:45,528] ERROR Failed to create job for etc/kafka-connect-jdbc/source-quickstart-sqlite.properties (org.apache.kafka.connect.cli.ConnectStandalone:88)
[2017-04-24 16:59:45,531] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:99)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid (use the endpoint `/{connectorType}/config/validate` to get a full list of errors)
        at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:80)
        at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:67)
        at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:96)
Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid (use the endpoint `/{connectorType}/config/validate` to get a full list of errors)
        at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:161)
        at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:93)
[2017-04-24 16:59:45,548] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:66)

Pls help know where to check the error logs and how to get this issue resolved

Ewen Cheslack-Postava

unread,
Apr 24, 2017, 11:22:26 PM4/24/17
to Confluent Platform
Is this list of source configs complete?

connection.url = JDBCURL of mysql
mode=incrementing
incrementing.column.name=id
table.whitelist=kafka_table
topic.prefix=test-sqlite-jdbc

If this is the entire contents of the file (assuming 'connection.url = JDBCURL of mysql' has been replaced correctly), then you're missing some required configs:

name=test-sqlite-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1

These are configs that all connectors are required to specify. The error you are seeing in the logs has been fixed/cleaned up for Kafka 0.10.2.1/CP 3.2.1 so that it will provide more information about what configuration is incorrect so it will be easier to figure out what needs adjustment. These fixes should be released imminently.

-Ewen


Disclaimer:This electronic message (e-mail) including any files transmitted as its attachment, is for the sole use of the individual or entity to whom it has been addressed, and may contain information that is confidential, proprietary or legally protected. If you are not the intended recipient(s) or have received this email in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments from your system. The contents of this (e-mail) do not necessarily represent the views or policies of Yatra Online Pvt Ltd or its affiliates / group companies (Yatra). Yatra makes no warranty that this e-mail is error or virus free and accepts no liability for any damage caused by any virus transmitted by this email.


--
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-platform+unsubscribe@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/a0b8c1e6-cf63-475e-94c5-782ab93348cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages