我正在使用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.abstractco)ordinator:409)[2018-09-12 07:38:17370]info加入组并获得分配:分配{error=0,leader='connect-1-63af40e1-da48-4055-99f8-8799582ba5aa',领导http://l ocalhost:8083/',偏移量=-1,连接器ID=[],任务ID=[]}(org.apache.kafka.conne ct.runtime.distributed.distributedherder:1194)[2018-09-12 07:38:17373]使用config offset-1启动连接器和任务的信息(org.apache.kafka.connect.runtime.distributed.distribu)tedherder:842) [2018-09-12 07:38:17,373]信息已完成启动连接器和任务(org.apach e.kafka.connect.runtime.distributed.distribu)tedherder:852)9月12日,2018年7:38:17 am org.glassfish.jersey.internal.errors logerrors警告:检测到以下警告:警告:org.apache.kafka.connect.runtime.rest.resources.connect orsresource中的(子)资源方法createconnector包含空路径注解。警告:org.apache.kafka.connect.run time.rest.resources.connectorsresource中的(子)资源方法listconnectors包含空路径注解。警告:org.apache.kafka.conne ct.runtime.rest.resources.ConnectorPlugins资源中的(子)资源方法listconnectorplugins包含空路径注解。警告:org.apache.kafka.connect.runtime.rest.resources.rootresource中的(子)资源方法serverinfo包含空路径注解。
[2018-09-12 07:38:18213]信息开始o.e.j.s。servletcontexthandler@21d1b321{/,null,可用}(org.eclipse.jetty.server.handler.conte)xthandler:744)[2018-09-12 07:38:18223]信息开始http_8083@6ec65b5e{http/1.1}{0.0.0.0:8083}(org.eclipse.jetty.server.server)connector:266) [2018-09-12 07:38:18,223]信息开始于15360ms(org.eclipse.jetty.server.server:379)[2018-09-12 07:38:18223]信息发布uri:http://localhost:8083/(org.apach e.kafka.connect.runtime.rest.r)estserver:248)[2018-09-12 07:38:18223]信息rest服务器正在侦听http://127.0.0.1:8083/,广告urlhttp://localhost:8083/(org.apache.kafka.connect.runtime.rest.re)stserver:207)[2018-09-12 07:38:18223]信息Kafka连接已启动(org.apache.kafka.connect.r untime。connect:55)[2018-09-12 07:43:16612]信息集群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:17289]信息集群id:8omhsnlasgubk4cbagb dw(org.apache.ka fka.clients)。metadata:265)
1条答案
按热度按时间gxwragnw1#
curl的错误建议您的请求通过squid http代理进行。你确定它被正确地转发了吗?你能直接打电话吗?