Kafka Connect - 文件源连接器错误 [英] Kafka Connect - File Source Connector error

本文介绍了Kafka Connect - 文件源连接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Conluent Platform/Kafka Connect 和类似的东西,我想运行几个例子.

我从这里关注了快速入门.这意味着:

  1. 安装 Confluent Platform (v3.2.1)
  2. 运行 Zookeeper、Kafka Broker 和 Schema Register
  3. 运行读取文件数据的示例(witk Kafka Connect)

我运行了这个命令(数字 3):

[root@sandbox confluent-3.2.1]# ./bin/connect-standalone ./etc/schema-registry/connect-avro-standalone.properties ./etc/kafka/connect-file-source.特性

但得到了这个结果:

SLF4J:类路径包含多个 SLF4J 绑定.SLF4J:在 [jar:file:/root/confluent-3.2.1/etc/kafka-connect-opentsdb/target/scala-2.11/kafka-connect-opentsdb-assembly-0.0.1.jar!/org/中找到绑定slf4j/impl/StaticLoggerBinder.class]SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka-serde-tools/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-elasticsearch/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-hdfs/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-s3/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-storage-common/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.jar 中找到绑定.班级]SLF4J:在 [jar:file:/root/confluent-3.2.1/share/java/kafka/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定SLF4J:有关解释,请参阅 http://www.slf4j.org/codes.html#multiple_bindings.SLF4J:实际绑定类型为 [ch.qos.logback.classic.util.ContextSelectorStaticBinder]线程main"中的异常 java.lang.NoSuchFieldError: SYSTEM在 org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:67)

ConnectStandalone.java文件中的第67行是这样的:Time time = Time.SYSTEM;,但我不知道,为什么它会导致任何错误.有任何想法吗?我错过了什么重要的东西吗?

我的工作环境:

  • Hortonworks 沙盒 [HDP 2.5.0.0-1245]
  • CentOS 6.8 版
  • Java:openjdk 版本1.8.0_121"

解决方案

我在ConnectStandalone.java 文件第67行是这样的:Time time = Time.SYSTEM"上遇到同样的问题

em>

可能是OpenTSDB连接器依赖于kafka-clients-versionA.jar的版本与./libs下的kafka-clients-versionB.jar不同.

I am playing with Conluent Platform/Kafka Connect and similar things and I wanted to run few examples.

I followed quickstart from here. It means:

  1. Install Confluent Platform (v3.2.1)
  2. Run Zookeeper, Kafka Broker and Schema Register
  3. Run example for reading file data (witk Kafka Connect)

I ran this command (number 3):

[root@sandbox confluent-3.2.1]# ./bin/connect-standalone ./etc/schema-registry/connect-avro-standalone.properties ./etc/kafka/connect-file-source.properties

but got this result:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/etc/kafka-connect-opentsdb/target/scala-2.11/kafka-connect-opentsdb-assembly-0.0.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka-serde-tools/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-elasticsearch/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-hdfs/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-s3/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka-connect-storage-common/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/confluent-3.2.1/share/java/kafka/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.lang.NoSuchFieldError: SYSTEM
    at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:67)

In ConnectStandalone.java file on the line 67 is this: Time time = Time.SYSTEM;, but I do not know, why it should cause any error. Any ideas? Am I missing something important?

My working environment:

  • Hortonworks Sandbox [HDP 2.5.0.0-1245]
  • CentOS release 6.8
  • Java: openjdk version "1.8.0_121"

解决方案

I meet the same problem on "ConnectStandalone.java file on the line 67 is this: Time time = Time.SYSTEM"

It is maybe that the OpenTSDB connector depend on the version of kafka-clients-versionA.jar is different from the kafka-clients-versionB.jar under ./libs.

这篇关于Kafka Connect - 文件源连接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆