1

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

我从这里开始快速入门。它的意思是:

  1. 安装 Confluent 平台 (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.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)

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

我的工作环境:

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

1 回答 1

1

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

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

于 2017-05-23T11:06:15.257 回答