如何将连接器安装到apache kafka connect的docker映像

7bsow1i6  于 2021-06-04  发布在  Kafka
关注(0)|答案(2)|浏览(376)

我正在使用https://hub.docker.com/r/1ambda/kafka-connect/ 在ubuntu上安装docker-kafka-connect。我可以运行它,但是我无法在其中安装更多的连接器。
我试过的
1-我试图将连接器文件从我的机器复制到docker containers连接器文件夹并重新启动api,http://localhost:8080/连接器提供空数组。
2-还在connect-distributed.properties中添加了插件路径。怎么做有什么想法吗??

piv4azn7

piv4azn71#

1-我试图将连接器文件从我的机器复制到docker containers连接器文件夹并重新启动api,http://localhost:8080/连接器提供空数组。
localhost:8083/connectors ,将提供活动连接器的列表。如果你需要查看可用插件的列表,你应该点击localhost:8083/connector-plugins

curl localhost:8083/connector-plugins
[{"class":"io.confluent.connect.activemq.ActiveMQSourceConnector","type":"source","version":"5.5.1"},{"class":"io.confluent.connect.elasticsearch.ElasticsearchSinkConnector","type":"sink","version":"5.5.1"},{"class":"io.confluent.connect.ibm.mq.IbmMQSourceConnector","type":"source","version":"5.5.1"},{"class":"io.confluent.connect.jdbc.JdbcSinkConnector","type":"sink","version":"5.5.1"},
{"class":"io.confluent.connect.jdbc.JdbcSourceConnector","type":"source","version":"5.5.1"},{"class":"io.confluent.connect.jms.JmsSourceConnector","type":"source","version":"5.5.1"},{"class":"io.confluent.connect.s3.S3SinkConnector","type":"sink","version":"5.5.1"},{"class":"io.confluent.connect.storage.tools.SchemaSourceConnector","type":"source","version":"5.5.1-ccs"},{"class":"io.confluent.kafka.connect.datagen.DatagenConnector","type":"source","version":"null"},{"class":"org.apache.kafka.connect.file.FileStreamSinkConnector","type":"sink","version":"5.5.1-ccs"}, 
{"class":"org.apache.kafka.connect.file.FileStreamSourceConnector","type":"source","version":"5.5.1-ccs"},{"class":"org.apache.kafka.connect.mirror.MirrorCheckpointConnector","type":"source","version":"1"},{"class":"org.apache.kafka.connect.mirror.MirrorHeartbeatConnector","type":"source","version":"1"},{"class":"org.apache.kafka.connect.mirror.MirrorSourceConnector","type":"source","version":"1"}]

此外,还需要在所有工作节点的插件路径中添加一个新的连接器,并且所有工作节点都需要重新启动
要进一步排除故障,您可以尝试增加日志级别以进行调试并检查启动日志如果正在遍历连接器路径,您将看到以下格式的日志:

DEBUG Loading plugin urls: ......

希望这有助于解决您的问题:)

wz8daaqr

wz8daaqr2#

该图像似乎没有更新以使用 plugin.path 因为它使用的是Kafka0.10
你可以用 confluent-hub 安装连接器,就像我在connect容器中记录的那样
https://github.com/onecricketeer/apache-kafka-connect-docker

相关问题