Kafka Connect - File Source Connector error

人盡茶涼 提交于 2019-12-11 06:14:06

问题


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"

回答1:


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.



来源:https://stackoverflow.com/questions/43788122/kafka-connect-file-source-connector-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!