1
votes

I am using kafka 2.0 with kafka connect running in distributed mode and tried configure debezium mysql connector but getting error

HTTP/1.1 500 Internal Server Error
Server: squid
Mime-Version: 1.0
Date: Wed, 12 Sep 2018 06:14:40 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 2869
X-Squid-Error: ERR_CANNOT_FORWARD 0
X-Cache: MISS from lnoi3proxy02.one.steria.dom
X-Cache-Lookup: MISS from lnoi3proxy02.one.steria.dom:8080
Connection: keep-alive

Here's the call:

curl -i -X POST -H "Accept:application/json" \  
    -H  "Content-Type:application/json" http://localhost:8083/connectors/ \
    -d '{ name": "inventory-connector",
    "config": {
        "connector.class":"io.debezium.connector.mysql.MySqlConnector",
        "database.hostname":"localhost",
        "database.port":"3306",
        "database.user":"root",
        "database.password":"Password@123",
        "database.dbname":"inventory",
         "database.server.id":"41228",
        "database.server.name":"customer",
        "database.whitelist":"inventory",
        "database.history.kafka.bootstrap.servers":"localhost:9092",
        "database.history.kafka.topic":"schema-changes.inventory",
       "include.schema.changes":"true"
      }
}'

kafka-connect logs :

INFO [Worker clientId=connect-1, groupId=connect-clust er] Successfully joined group with generation 7 (org.apache.kafka.clients.consum er.internals.AbstractCoordinator:409) [2018-09-12 07:38:17,370] INFO Joined group and got assignment: Assignment{error =0, leader='connect-1-63af40e1-da48-4055-99f8-8799582ba5aa', leaderUrl='http://l ocalhost:8083/', offset=-1, connectorIds=[], taskIds=[]} (org.apache.kafka.conne ct.runtime.distributed.DistributedHerder:1194) [2018-09-12 07:38:17,373] INFO Starting connectors and tasks using config offset -1 (org.apache.kafka.connect.runtime.distributed.DistributedHerder:842) [2018-09-12 07:38:17,373] INFO Finished starting connectors and tasks (org.apach e.kafka.connect.runtime.distributed.DistributedHerder:852) Sep 12, 2018 7:38:17 AM org.glassfish.jersey.internal.Errors logErrors WARNING: The following warnings have been detected: WARNING: The (sub)resource m ethod createConnector in org.apache.kafka.connect.runtime.rest.resources.Connect orsResource contains empty path annotation. WARNING: The (sub)resource method listConnectors in org.apache.kafka.connect.run time.rest.resources.ConnectorsResource contains empty path annotation. WARNING: The (sub)resource method listConnectorPlugins in org.apache.kafka.conne ct.runtime.rest.resources.ConnectorPluginsResource contains empty path annotatio n. WARNING: The (sub)resource method serverInfo in org.apache.kafka.connect.runtime .rest.resources.RootResource contains empty path annotation.

[2018-09-12 07:38:18,213] INFO Started o.e.j.s.ServletContextHandler@21d1b321{/, null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler:744) [2018-09-12 07:38:18,223] INFO Started http_8083@6ec65b5e{HTTP/1.1}{0.0.0.0:8083 } (org.eclipse.jetty.server.ServerConnector:266) [2018-09-12 07:38:18,223] INFO Started @15360ms (org.eclipse.jetty.server.Server :379) [2018-09-12 07:38:18,223] INFO Advertised URI: http://localhost:8083/ (org.apach e.kafka.connect.runtime.rest.RestServer:248) [2018-09-12 07:38:18,223] INFO REST server listening at http://127.0.0.1:8083/, advertising URL http://localhost:8083/ (org.apache.kafka.connect.runtime.rest.Re stServer:207) [2018-09-12 07:38:18,223] INFO Kafka Connect started (org.apache.kafka.connect.r untime.Connect:55) [2018-09-12 07:43:16,612] INFO Cluster ID: 8oMHsNLASgubK4CBagB-dw (org.apache.ka fka.clients.Metadata:265) [2018-09-12 07:43:17,052] INFO Cluster ID: 8oMHsNLASgubK4CBagB-dw (org.apache.ka fka.clients.Metadata:265) [2018-09-12 07:43:17,289] INFO Cluster ID: 8oMHsNLASgubK4CBagB-dw (org.apache.ka fka.clients.Metadata:265)

1
Any logs from Kafka Connect?Giorgos Myrianthous

1 Answers

0
votes

The error from the curl proposes that your request goes via Squid http proxy. Are you sure that it is properly forwarded? Can you make a direct call?