我如何处理kafka-avro-console-producer失败?

时间:2017-02-09 04:31:26

标签: kafka-producer-api

当遵循汇合平台快速入门时,我在第5步遇到了问题。发生了错误:

[root @ CentOS-70 confluent-3.1.2]#。/ bin/kafka-avro-console-producer --broker-list localhost:9092 --topic mytopic --property value.schema ='{“type “:” 记录”, “名称”: “myrecord”, “字段”:[{ “名称”: “F1”, “类型”: “串”}]}” SLF4J:类路径包含多个SLF4J绑定。 SLF4J:在[jar:file:/home/wei_liu/confluent-3.1.2/share/java/kafka-serde-tools/slf4j-log4j12-1.7.6.jar!/ org / slf4j / impl / StaticLoggerBinder中找到绑定。类] SLF4J:在[jar:file:/home/wei_liu/confluent-3.1.2/share/java/schema-registry/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定 SLF4J:有关解释,请参阅http://www.slf4j.org/codes.html#multiple_bindings。 SLF4J:实际绑定的类型为[org.slf4j.impl.Log4jLoggerFactory] ​​

{“f1”:“value1”}

org.apache.kafka.common.errors.SerializationException:注册Avro架构时出错:{“type”:“record”,“name”:“myrecord”,“fields”:[{“name”:“f1” “类型”: “串”}]} 引起:io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException:写入Kafka存储时注册模式操作失败;错误代码:50001         在io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:170)         在io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:187)         在io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:238)         在io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:230)         在io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:225)         at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.registerAndGetId(CachedSchemaRegistryClient.java:59)         在io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:91)         at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:72)         at io.confluent.kafka.formatter.AvroMessageReader.readMessage(AvroMessageReader.java:158)         at kafka.tools.ConsoleProducer $ .main(ConsoleProducer.scala:55)         在kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)

0 个答案:

没有答案