使用kafka connect配置debezium mysql连接器失败

时间:2018-09-12 07:12:20

标签: mysql apache-kafka apache-kafka-connect debezium

我将kafka 2.0与以分布式模式运行的kafka connect结合使用,并尝试配置debezium mysql连接器,但 错误

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

这是电话:

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连接日志:

INFO [Worker clientId = connect-1,groupId = connect-clust er]已成功加入第7代的组(org.apache.kafka.clients.consum er.internals.AbstractCoordinator:409) [2018-09-12 07:38:17,370]信息加入组并获得分配:分配{错误= 0,leader ='connect-1-63af40e1-da48-4055-99f8-8799582ba5aa',leaderUrl ='{{3} } ocalhost:8083 /',offset = -1,connectorIds = [],taskIds = []}(org.apache.kafka.conne ct.runtime.distributed.DistributedHerder:1194) [2018-09-12 07:38:17,373]信息使用配置偏移量-1启动连接器和任务(org.apache.kafka.connect.runtime.distributed.DistributedHerder:842) [2018-09-12 07:38:17,373]信息已完成启动连接器和任务(org.apach e.kafka.connect.runtime.distributed.DistributedHerder:852) 2018年9月12日上午7:38:17 org.glassfish.jersey.internal.Errors logErrors 警告:已检测到以下警告:警告:org.apache.kafka.connect.runtime.rest.resources.Connect中的(子)资源方法createConnector orsResource包含空路径注释。 警告:org.apache.kafka.connect.run time.rest.resources.ConnectorsResource中的(子)资源方法listConnectors包含空路径注释。 警告:org.apache.kafka.conne ct.runtime.rest.resources.ConnectorPluginsResource中的(子)资源方法listConnectorPlugins包含空路径注释。 警告:org.apache.kafka.connect.runtime .rest.resources.RootResource中的(子)资源方法serverInfo包含空路径注释。

[2018-09-12 07:38:18,213] INFO从o.e.j.s.ServletContextHandler@21d1b321{/,null,AVAILABLE}开始(org.eclipse.jetty.server.handler.ContextHandler:744) [2018-09-12 07:38:18,223] INFO开始http_8083 @ 6ec65b5e {HTTP / 1.1} {0.0.0.0:8083}(org.eclipse.jetty.server.ServerConnector:266) [2018-09-12 07:38:18,223]信息开始于@ 15360ms(org.eclipse.jetty.server.Server:379) [2018-09-12 07:38:18,223]信息广告URI:http://l(org.apach e.kafka.connect.runtime.rest.RestServer:248) [2018-09-12 07:38:18,223] INFO REST服务器在http://localhost:8083/侦听,广告URL http://127.0.0.1:8083/(org.apache.kafka.connect.runtime.rest.Re stServer:207) [2018-09-12 07:38:18,223]信息Kafka Connect已启动(org.apache.kafka.connect.r untime.Connect:55) [2018-09-12 07:43:16,612]信息集群ID:8oMHsNLASgubK4CBagB-dw(org.apache.ka fka.clients.Metadata:265) [2018-09-12 07:43:17,052]信息集群ID:8oMHsNLASgubK4CBagB-dw(org.apache.ka fka.clients.Metadata:265) [2018-09-12 07:43:17,289]信息集群ID:8oMHsNLASgubK4CBagB-dw(org.apache.ka fka.clients.Metadata:265)

1 个答案:

答案 0 :(得分:0)

curl错误提示您的请求通过Squid http代理进行。您确定它已正确转发吗?您可以直接拨打电话吗?