我用的是沙发床Flume连接器。cb和kafka在两个不同的ec2示例中,在不同的aws区域。我正在关注这些文件:
https://docs.couchbase.com/kafka-connector/current/quickstart.html
https://kafka.apache.org/documentation/#connect_configuring
基于这些,我推测connect必须在安装了kafka的主机上运行。我的连接是否可以在远程主机上运行,以便我从远程kafka读取消息并将消息接收到远程cb bucket中?有没有具体的文件?
此外,我得到以下错误:
at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:79)
at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:66)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:118)
Caused by: org.apache.kafka.connect.errors.ConnectException: Failed to find any class that implements Connector and which name matches com.couchbase.connect.kafka.CouchbaseSinkConnector, available connectors are: PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSinkConnector, name='org.apache.kafka.connect.file.FileStreamSinkConnector', version='2.3.0', encodedVersion=2.3.0, type=sink, typeName='sink', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSourceConnector, name='org.apache.kafka.connect.file.FileStreamSourceConnector', version='2.3.0', encodedVersion=2.3.0, type=source, typeName='source', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector', version='2.3.0', encodedVersion=2.3.0, type=connector, typeName='connector', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector', version='2.3.0', encodedVersion=2.3.0, type=sink, typeName='sink', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector', version='2.3.0', encodedVersion=2.3.0, type=source, typeName='source', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector', version='2.3.0', encodedVersion=2.3.0, type=source, typeName='source', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector', version='2.3.0', encodedVersion=2.3.0, type=source, typeName='source', location='classpath'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector', version='2.3.0', encodedVersion=2.3.0, type=source, typeName='source', location='classpath'}
at org.apache.kafka.connect.runtime.isolation.Plugins.connectorClass(Plugins.java:180)
at org.apache.kafka.connect.runtime.isolation.Plugins.newConnector(Plugins.java:152)
at org.apache.kafka.connect.runtime.AbstractHerder.getConnector(AbstractHerder.java:519)
at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:289)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:192)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:115)
2条答案
按热度按时间elcex8rz1#
kafka connect找不到您的连接器。可以将plugin.path设置为指向连接器jar文件,也可以将连接器jar文件复制到kafka lib目录中。
j13ufse22#
我认为connect必须在安装了kafka的主机上运行。
有Kafka图书馆,是的,但不是一个实际运行的经纪人,不是。
换句话说,您不能将kafka connect作为分离服务下载,因此当您获得它时,它已经随kafka库一起提供了。
我的连接是否可以在远程主机上运行,以便我从远程kafka读取消息并将消息接收到远程cb bucket中?
这是建议的部署。类似于你不会在经纪人身上运行正常的生产者和消费者。Kafka连接应该没有区别对待。
引导服务器和couchbase连接字符串将是它们各自的远程地址
医生在这里
https://kafka.apache.org/documentation/#connect_running
https://docs.confluent.io/current/connect/userguide.html#deployment-注意事项
此外,我得到以下错误:
Failed to find any class that implements Connector and which name matches com.couchbase.connect.kafka.CouchbaseSinkConnector
如果你看一下available connectors are:
,你看你的没有列出来。这意味着您没有正确加载plugin.path
库中的连接器属性。https://docs.confluent.io/current/connect/managing/install.html
https://docs.confluent.io/current/connect/managing/community.html
正如couchbase文件所说:
修改
plugin.path
属性包含的父目录kafka-connect-couchbase-<version>.jar
在发布配置之前,还可以使用/connector-plugins
终结点