【发布时间】:2019-06-23 18:25:34
【问题描述】:
我已经在 Ubuntu 16.04 机器上安装了 confluent 平台,最初我已经配置了 zookeeper、Kafka 和 ksql 并启动了 confluent 平台。 我能够看到以下消息。
root@DESKTOP-DIB3097:/opt/kafkafull/confluent-5.1.0/bin# ./confluent start
This CLI is intended for development only, not for production
https://docs.confluent.io/current/cli/index.html
Using CONFLUENT_CURRENT: /tmp/confluent.HUlCltYT
Starting zookeeper
zookeeper is [UP]
Starting kafka
kafka is [UP]
Starting schema-registry
schema-registry is [UP]
Starting kafka-rest
kafka-rest is [UP]
Starting connect
connect is [UP]
Starting ksql-server
ksql-server is [UP]
Starting control-center
control-center is [UP]
现在一切正常,当我检查融合平台的状态时,我观察到架构注册表、连接和控制中心已关闭。
我检查了架构注册表的日志,发现了以下日志。
ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication)
io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryInitializationException: Error initializing kafka store while initializing schema registry
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:210)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.initSchemaRegistry(SchemaRegistryRestApplication.java:61)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:72)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:39)
at io.confluent.rest.Application.createServer(Application.java:201)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:41)
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:137)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:208)
... 5 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:422)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.waitUntilKafkaReaderReachesLastOffset(KafkaStore.java:275)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:135)
... 6 more
Caused by: java.util.concurrent.TimeoutException: Timeout after waiting for 60000 ms.
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:78)
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.getLatestOffset(KafkaStore.java:417)
... 8 more
【问题讨论】:
-
您是否尝试在 Zookeeper 和 Kafka 启动后重新启动单个服务器?
-
感谢您的快速回复。我试过单独重启服务。最初服务已启动,但当我检查状态时,服务会通过抛出上述错误自动停止。 更多信息:要启动连接服务,我猜 Schema Registry 是必需的。是这样吗?
-
如果你使用
confluent start,那么是需要注册表,但如果在没有 Avro 转换器的情况下手动启动,例如从 Apache Kafka 下载,则不需要。 -
感谢您的回复。我们理想的任务是使用 Kafka 连接 jdbc 作为源。要使用连接,我想我们需要模式注册表。所以我正在研究这个。
标签: apache-kafka confluent-platform confluent-schema-registry