Kafka 连接器异常 ERROR Failed to send HTTP request to endpoint: http://localhost:8081/subjects/jdbc-source-accounts-value/versions

Kafka connector exception ERROR Failed to send HTTP request to endpoint: http://localhost:8081/subjects/jdbc-source-accounts-value/versions

我使用 Confluent Platform 3.3 作为 Kafka 连接器,同时使用以下命令启动连接器,

./bin/connect-standalone ./etc/schema-registry/connect-avro-standalone.properties ./etc/kafka-connect-jdbc/connect-jdbc-source.properties

出现以下错误

ERROR Server died unexpectedly:  (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:52)
org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
[2017-10-30 13:49:56,178] ERROR Failed to send HTTP request to endpoint: http://localhost:8081/subjects/jdbc-source-accounts-value/versions 
(io.confluent.kafka.schemaregistry.client.rest.RestService:156)

Zookeeper 运行 在 kafka 客户端 2181 端口,我尝试通过以下命令启动模式

 ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties &

但它没有显示任何错误消息,但端口 8081 没有up.Please帮助我解决这个问题。

如果您使用的是 Confluent Platform 3.3,我建议您使用 Confluent CLI,因为它是您已经下载的一部分,可以让生活变得更简单。然后您可以轻松检查组件的状态。

confluent start
confluent status kafka

等等

在此处查看此视频:https://vimeo.com/228505612

就您遇到的问题而言,我会检查架构注册表的日志。您可以使用 Confluent CLI

confluent log schema-registry

我在 运行 使用 Spring Cloud Stream 的制作人时也遇到了同样的问题。用实际 IP 地址替换 localhost 会有帮助