Kafka Connect - File Source Connector error

Refresh

April 2019

Views

730 time

1

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):

[[email protected] 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 answers

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.