我使用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连接日志:
信息[Worker clientId=connect-1,groupId=connect-clust er]已成功加入第7代的组(org.apache.kafka.clients.com.er.internals.AbstractCoordinator:409)〔2018-09-12 07:38:17370〕INFO加入群并获得任务:任务{error=0,leader='connect-1-63af40e1-da48-4055-99f8-8799582ba5aa',leaderUrl='http://localhost:8083/',offset=-1,connectorIds=[],taskIds=[]}(org.apache.kafka.conne ct.runtime.distributed.DistributedHerder:1194)〔2018-09-12 07:38:17373〕信息使用配置偏移量-1启动连接器和任务(org.apache.kafka.connect.runtime.distributed.DistributedHerder:842)〔2018-09-12 07:38:17373〕信息已完成连接器和任务的启动(org.apache.kafka.connect.runtime.distributed.DistributedHerder:852)2018年9月12日上午7:38:17 org.lassfish.jersey.internal.Errors日志错误警告:已检测到以下警告:警告:org.apache.kafka.connect.runtime.rest.resources.connect中的(子)资源方法createConnectororsResource包含空的路径注释。警告:org.apache.kafka.connect.run time.rest.resources.ConnectorsResource中的(子)资源方法listConnectors包含空路径注释。警告:org.apache.kafka.conne ct.runtime.rest.resources.ConnectorPluginsResource中的(子)资源方法列表ConnectorPlugins资源包含空路径注释n警告:org.apache.kafka.connect.runtime.rest.resources.RootResource中的(子)资源方法serverInfo包含空路径注释。
〔2018-09-12 07:38:18213〕信息开始o.e.j.s.ServletContextHandler@21d1b321{/,null,AVAILABLE}(org.eclipse.jjetty.server.handler.ContextHandler:744)〔2018-09-12 07:38:18223〕信息开始http_8083@6ec65b5e{HTTP/1.1}{0.0.0.0:8083}(org.eclipse.jjetty.server.ServerConnector:266)〔2018-09-12 07:38:18223〕信息开始于15360ms(org.eclipse.jety.server.server:379)〔2018-09-12 07:38:18223〕信息播发URI:http://localhost:8083/(org.apache.kafka.connect.runtime.rest.RestServer:248)〔2018-09-12 07:38:18223〕INFO REST服务器正在侦听http://127.0.0.1:8083/,广告URLhttp://localhost:8083/(org.apache.kafka.connect.runtime.rest.Re服务器:207)〔2018-09-12 07:38:18223〕信息Kafka Connect启动(org.apache.Kafka.Connect.runtime.Connect:55)〔2018-09-12 07:43:16612〕信息集群ID:8oMHsNLASgubK4CBagB dw(org.apache.ka fka.clients.元数据:265)〔2018-09-12 07:43:17052〕信息集群ID:8oMHsNLASgubK4CBagB dw(org.apache.ka fka.clients.元数据:265)〔2018-09-12 07:43:17289〕信息集群ID:8oMHsNLASgubK4CBagB dw(org.apache.ka fka.clients.Metadata:265)
curl中的错误建议您的请求通过Squid http代理。你确定它被正确转发了吗?你能直接打电话吗?