Kafka Connect - 文件源连接器错误

时间:2017-05-04 16:18:16

标签: java apache-kafka hortonworks-data-platform apache-kafka-connect confluent

我正在玩 Conluent Platform / Kafka Connect 和类似的东西,我想举几个例子。

我跟随here的快速启动。这意味着:

  1. 安装Confluent Platform(v3.2.1)
  2. 运行Zookeeper,Kafka Broker和Schema Register
  3. 运行读取文件数据的示例(知道Kafka Connect)
  4. 我运行了这个命令(编号3):

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

    但得到了这个结果:

    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)
    

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

    我的工作环境:

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

1 个答案:

答案 0 :(得分:1)

我在 上遇到同样的问题“第67行的ConnectStandalone.java文件是:时间= Time.SYSTEM”

OpenTSDB连接器可能取决于 kafka-clients-versionA.jar的版本与./libs.