本文介绍了找不到任何实现Connector且名称与io.confluent.connect.mqtt.MqttSourceConnector匹配的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

curl -s -X POST -H 'Content-Type: application/json' http://localhost:8083/connectors -d '{
>  "name" : "mqtt-source",
>  "config" : {
>    "connector.class" : "io.confluent.connect.mqtt.MqttSourceConnector",
>    "tasks.max" : "1",
>    "mqtt.server.uri" : "tcp://10.1.78.100:1883",
>    "mqtt.topics" : "Essen/IMU/IMU01",
>    "kafka.topics" : "Essen.IMU.IMU01"
>  }
>}'
{"error_code":500,"message":"Failed to find any class that implements Connector and which name matches io.confluent.connect.mqtt.MqttSourceConnector, available connectors are: PluginDesc{klass=class io.confluent.connect.activemq.ActiveMQSourceConnector, name='io.confluent.connect.activemq.ActiveMQSourceConnector', version='5.0.0', encodedVersion=5.0.0, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-activemq/'}, PluginDesc{klass=class io.confluent.connect.elasticsearch.ElasticsearchSinkConnector, name='io.confluent.connect.elasticsearch.ElasticsearchSinkConnector', version='5.0.0', encodedVersion=5.0.0, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-elasticsearch/'}, PluginDesc{klass=class io.confluent.connect.hdfs.HdfsSinkConnector, name='io.confluent.connect.hdfs.HdfsSinkConnector', version='5.0.0', encodedVersion=5.0.0, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-hdfs/'}, PluginDesc{klass=class io.confluent.connect.hdfs.tools.SchemaSourceConnector, name='io.confluent.connect.hdfs.tools.SchemaSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-hdfs/'}, PluginDesc{klass=class io.confluent.connect.ibm.mq.IbmMQSourceConnector, name='io.confluent.connect.ibm.mq.IbmMQSourceConnector', version='5.0.0', encodedVersion=5.0.0, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-ibmmq/'}, PluginDesc{klass=class io.confluent.connect.jdbc.JdbcSinkConnector, name='io.confluent.connect.jdbc.JdbcSinkConnector', version='5.0.0', encodedVersion=5.0.0, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-jdbc/'}, PluginDesc{klass=class io.confluent.connect.jdbc.JdbcSourceConnector, name='io.confluent.connect.jdbc.JdbcSourceConnector', version='5.0.0', encodedVersion=5.0.0, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-jdbc/'}, PluginDesc{klass=class io.confluent.connect.jms.JmsSourceConnector, name='io.confluent.connect.jms.JmsSourceConnector', version='5.0.0', encodedVersion=5.0.0, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-ibmmq/'}, PluginDesc{klass=class io.confluent.connect.replicator.ReplicatorSourceConnector, name='io.confluent.connect.replicator.ReplicatorSourceConnector', version='5.0.0', encodedVersion=5.0.0, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-replicator/'}, PluginDesc{klass=class io.confluent.connect.s3.S3SinkConnector, name='io.confluent.connect.s3.S3SinkConnector', version='5.0.0', encodedVersion=5.0.0, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-s3/'}, PluginDesc{klass=class io.confluent.connect.storage.tools.SchemaSourceConnector, name='io.confluent.connect.storage.tools.SchemaSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka-connect-storage-common/'}, PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSinkConnector, name='org.apache.kafka.connect.file.FileStreamSinkConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSourceConnector, name='org.apache.kafka.connect.file.FileStreamSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/kafka/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockConnector, name='org.apache.kafka.connect.tools.MockConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=connector, typeName='connector', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSinkConnector, name='org.apache.kafka.connect.tools.MockSinkConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=sink, typeName='sink', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector, name='org.apache.kafka.connect.tools.MockSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.SchemaSourceConnector, name='org.apache.kafka.connect.tools.SchemaSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSinkConnector, name='org.apache.kafka.connect.tools.VerifiableSinkConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}, PluginDesc{klass=class org.apache.kafka.connect.tools.VerifiableSourceConnector, name='org.apache.kafka.connect.tools.VerifiableSourceConnector', version='2.0.0-cp1', encodedVersion=2.0.0-cp1, type=source, typeName='source', location='file:/opt/confluent-5.0.0/share/java/confluent-kafka-mqtt/'}" }

我正试图从另一台计算机上的代理Mosquitto接收数据.

I am trying to receive data from the broker Mosquitto which is in another machine.

我安装了Confluent平台和kafka-connector-mqtt-source,但是没有收到数据.配置:

I installed the Confluent platform and the kafka-connector-mqtt-source but I do not receive data.The config:

name=mqtt-source
tasks.max=1
connector.class=io.confluent.connect.mqtt.MqttSourceConnector
mqtt.server.uri=tcp://10.1.78.100:1883
mqtt.topics=Essen/IMU/IMU01
kafka.topics=mqtt.Essen.IMU.IMU01

推荐答案

似乎您安装了错误的连接器(不使用Confluent Hub命令?)

Seems you installed the connector wrong (not using Confluent Hub command?)

在错误中搜索 confluent-kafka-mqtt ,您会发现连接器类不存在

Search the error for confluent-kafka-mqtt and you'll see your connector class doesn't exist as being available

您还可以 GET/connector-plugins 在POST之前验证其是否已加载

You can also GET /connector-plugins to verify its loaded before you POST

这篇关于找不到任何实现Connector且名称与io.confluent.connect.mqtt.MqttSourceConnector匹配的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 13:02