2015-11-19 195 views
5

我试图启动kafka模式注册表,但出现以下错误:无法将noop记录写入kafka商店。堆栈跟踪如下。我检查了与动物园管理员,卡夫卡经纪人的联系 - 一切都很好。我可以发信息给卡夫卡。我试图删除_schema主题,甚至重新安装kafka,但这个问题仍然存在。昨天一切正常,但今天,重新启动我的流浪者箱后,这个问题出现了。有什么我可以做的吗?谢谢Kafka Schema注册表错误:未能写入Noop记录到kafka商店

[2015-11-19 19:12:25,904] INFO SchemaRegistryConfig values: 
master.eligibility = true 
port = 8081 
kafkastore.timeout.ms = 500 
kafkastore.init.timeout.ms = 60000 
debug = false 
kafkastore.zk.session.timeout.ms = 30000 
request.logger.name = io.confluent.rest-utils.requests 
metrics.sample.window.ms = 30000 
schema.registry.zk.namespace = schema_registry 
kafkastore.topic = _schemas 
avro.compatibility.level = none 
shutdown.graceful.ms = 1000 
response.mediatype.preferred = [application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, application/json] 
metrics.jmx.prefix = kafka.schema.registry 
host.name = 12bac2a9529f 
metric.reporters = [] 
kafkastore.commit.interval.ms = -1 
kafkastore.connection.url = master.mesos:2181 
metrics.num.samples = 2 
response.mediatype.default = application/vnd.schemaregistry.v1+json 
kafkastore.topic.replication.factor = 3 
(io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig:135) 

[2015-11-19 19:12:25,904] INFO SchemaRegistryConfig values: 
master.eligibility = true 
port = 8081 
kafkastore.timeout.ms = 500 
kafkastore.init.timeout.ms = 60000 
debug = false 
kafkastore.zk.session.timeout.ms = 30000 
request.logger.name = io.confluent.rest-utils.requests 
metrics.sample.window.ms = 30000 
schema.registry.zk.namespace = schema_registry 
kafkastore.topic = _schemas 
avro.compatibility.level = none 
shutdown.graceful.ms = 1000 
response.mediatype.preferred = [application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, application/json] 
metrics.jmx.prefix = kafka.schema.registry 
host.name = 12bac2a9529f 
metric.reporters = [] 
kafkastore.commit.interval.ms = -1 
kafkastore.connection.url = master.mesos:2181 
metrics.num.samples = 2 
response.mediatype.default = application/vnd.schemaregistry.v1+json 
kafkastore.topic.replication.factor = 3 
(io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig:135) 
[2015-11-19 19:12:26,535] INFO Initialized the consumer offset to -1  (io.confluent.kafka.schemaregistry.storage.KafkaStoreReaderThread:87) 
[2015-11-19 19:12:27,167] WARN Creating the schema topic _schemas using a replication factor of 1, which is less than the desired one of 3. If this is a production environment, it's crucial to add more brokers and increase the replication factor of the topic. (io.confluent.kafka.schemaregistry.storage.KafkaStore:172) 
[2015-11-19 19:12:27,262] INFO [kafka-store-reader-thread-_schemas], Starting (io.confluent.kafka.schemaregistry.storage.KafkaStoreReaderThread:68) 
[2015-11-19 19:13:27,350] ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication:57) 
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryInitializationException: Error initializing kafka store while initializing schema registry 
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:164) 
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:55) 
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:37) 
at io.confluent.rest.Application.createServer(Application.java:104) 
at io.confluent.kafka.schemaregistry.rest.Main.main(Main.java:42) 
Caused by: io.confluent.kafka.schemaregistry.storage.exceptions.StoreInitializationException: io.confluent.kafka.schemaregistry.storage.exceptions.StoreException: Failed to write Noop record to kafka store. 
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:151) 
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:162) 
... 4 more 
Caused by: io.confluent.kafka.schemaregistry.storage.exceptions.StoreException: Failed to write Noop record to kafka store. 
at io.confluent.kafka.schemaregistry.storage.KafkaStore.getLatestOffset(KafkaStore.java:363) 
at io.confluent.kafka.schemaregistry.storage.KafkaStore.waitUntilKafkaReaderReachesLastOffset(KafkaStore.java:220) 
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:149) 
... 5 more 
+1

您是否从当时的卡夫卡原木有错误? –

回答

0

我得到了同样的错误。问题是,我预计,卡夫卡使用kafka命名空间中的ZooKeeper,所以我将它设置在schema-registry.properties

kafkastore.connection.url=localhost:2181/kafka 

但卡夫卡server.properties我没有设置它。配置包含

zookeeper.connect=localhost:2181 

,所以我只需要添加ZooKeeper的命名空间这个属性,然后重新启动卡夫卡

zookeeper.connect=localhost:2181/kafka 

也许你的问题是你定义您的模式,注册表想到“/”命名空间,但在你的卡夫卡配置别的东西。你可以发布卡夫卡配置吗?

或者,您可以使用zkCli.sh找出ZooKeeper Kafka存储主题信息的位置。

/bin/zkCli.sh localhost:2181 
Welcome to ZooKeeper! 
ls /kafka 
[cluster, controller, controller_epoch, brokers, admin, isr_change_notification, consumers, latest_producer_id_block, config] 
相关问题