Confluent 找不到任何实现连接器的 class
Confluent failed to find any class that implements connector
我去https://www.confluent.io/installation/,在“Local”下下载了ZIP文件中的Confluent platform,解压后,我继续通过以下命令启动confluent platform:
confluent local services start
我可以看到所有服务都已正确启动,并且我可以通过浏览器查看我的控制中心。
这是我的 Confluent 平台的文件夹结构:
之后,我参考this,安装sftp连接器。
我通过以下命令安装连接器:
confluent-hub install confluentinc/kafka-connect-sftp:latest
命令运行成功,我可以看到在/share/confluent-hub-components
中创建的文件夹
根据 confluent website 的指南,我需要创建 1 个文件调用 sftp.json
,然后通过以下命令加载连接器:
confluent local services connect connector load CsvSFTP --config sftp.json
但是,我遇到了如下错误:
[meow@localhost confluent-7.0.1]$ confluent local services connect connector load CsvSFTP --config sftp.json
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html
{
"error_code": 500,
"message": "Failed to find any class that implements Connector and which name matches io.confluent.connect.sftp.SftpCsvSourceConnector, available connectors are: PluginDesc{klass=class io.confluent.connect.replicator.ReplicatorSourceConnector, name='io.confluent.connect.replicator.ReplicatorSourceConnector', version='7.0.1', encodedVersion=7.0.1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka-connect-replicator/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorCheckpointConnector, name='org.apache.kafka.connect.mirror.MirrorCheckpointConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorHeartbeatConnector, name='org.apache.kafka.connect.mirror.MirrorHeartbeatConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorSourceConnector, name='org.apache.kafka.connect.mirror.MirrorSourceConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=connector, typeName='connector', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=sink, typeName='sink', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}"
看来我的confluent平台没有加载我安装的connector,于是我去编辑connect-standalone.properties
中的plugin.path值,在新安装的connector路径中添加:
plugin.path=/usr/share/java,/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/confluent-hub-components
然后重启我的融合平台,再试一次,结果还是一样,错误信息还是一样。我犯了什么错误?
我怎么知道启动 Confluent Platform 时正在加载 connect-standalone.properties
,因为我在 /home/meow/Workspace/confluentPlatform/confluent-7.0.1/logs
中检查了我的登录,除非 schema-registry.log
.[=26,否则它不会附加到那里=]
confluent
CLI 应该使用 etc/schema-registry/connect-avro-distributed.properties
作为架构注册表配置,而不是任何独立配置。
尝试更新另一个文件中的 plugin.path
,然后重试。
how can I know the connect-standalone.properties is being loaded
尝试ps -aux | grep Connect
如果您使用 Linux 主机,建议您使用 APT/YUM 安装方法,而不是 tarball
https://docs.confluent.io/platform/current/installation/installing_cp/overview.html
我去https://www.confluent.io/installation/,在“Local”下下载了ZIP文件中的Confluent platform,解压后,我继续通过以下命令启动confluent platform:
confluent local services start
我可以看到所有服务都已正确启动,并且我可以通过浏览器查看我的控制中心。
这是我的 Confluent 平台的文件夹结构:
之后,我参考this,安装sftp连接器。
我通过以下命令安装连接器:
confluent-hub install confluentinc/kafka-connect-sftp:latest
命令运行成功,我可以看到在/share/confluent-hub-components
中创建的文件夹根据 confluent website 的指南,我需要创建 1 个文件调用 sftp.json
,然后通过以下命令加载连接器:
confluent local services connect connector load CsvSFTP --config sftp.json
但是,我遇到了如下错误:
[meow@localhost confluent-7.0.1]$ confluent local services connect connector load CsvSFTP --config sftp.json
The local commands are intended for a single-node development environment only,
NOT for production usage. https://docs.confluent.io/current/cli/index.html
{
"error_code": 500,
"message": "Failed to find any class that implements Connector and which name matches io.confluent.connect.sftp.SftpCsvSourceConnector, available connectors are: PluginDesc{klass=class io.confluent.connect.replicator.ReplicatorSourceConnector, name='io.confluent.connect.replicator.ReplicatorSourceConnector', version='7.0.1', encodedVersion=7.0.1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka-connect-replicator/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorCheckpointConnector, name='org.apache.kafka.connect.mirror.MirrorCheckpointConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorHeartbeatConnector, name='org.apache.kafka.connect.mirror.MirrorHeartbeatConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.mirror.MirrorSourceConnector, name='org.apache.kafka.connect.mirror.MirrorSourceConnector', version='1', encodedVersion=1, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=connector, typeName='connector', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=sink, typeName='sink', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector', version='7.0.1-ce', encodedVersion=7.0.1-ce, type=source, typeName='source', location='file:/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/java/acl/'}"
看来我的confluent平台没有加载我安装的connector,于是我去编辑connect-standalone.properties
中的plugin.path值,在新安装的connector路径中添加:
plugin.path=/usr/share/java,/home/meow/Workspace/confluentPlatform/confluent-7.0.1/share/confluent-hub-components
然后重启我的融合平台,再试一次,结果还是一样,错误信息还是一样。我犯了什么错误?
我怎么知道启动 Confluent Platform 时正在加载 connect-standalone.properties
,因为我在 /home/meow/Workspace/confluentPlatform/confluent-7.0.1/logs
中检查了我的登录,除非 schema-registry.log
.[=26,否则它不会附加到那里=]
confluent
CLI 应该使用 etc/schema-registry/connect-avro-distributed.properties
作为架构注册表配置,而不是任何独立配置。
尝试更新另一个文件中的 plugin.path
,然后重试。
how can I know the connect-standalone.properties is being loaded
尝试ps -aux | grep Connect
如果您使用 Linux 主机,建议您使用 APT/YUM 安装方法,而不是 tarball
https://docs.confluent.io/platform/current/installation/installing_cp/overview.html