【问题标题】:KSQLDB connection refused to Kafka ConnectKSQLDB 连接拒绝 Kafka Connect
【发布时间】:2021-05-15 02:42:29
【问题描述】:

我正在 KSQLDB Elasticsearch 连接器上做 PoC。

我正在关注 2 个在线文档:

一个:

https://ksqldb.io/quickstart.html

在我休息后一切正常

第二个:

https://github.com/confluentinc/demo-scene/blob/master/build-a-streaming-pipeline/demo_build-a-streaming-pipeline.adoc

我在运行这个命令时遇到了这个问题:

CREATE SINK CONNECTOR SINK_ES_sample_1 WITH (
    'connector.class' = 'io.confluent.connect.elasticsearch.ElasticsearchSinkConnector',
    'topics'          = 'sample_1',
    'connection.url'  = 'http://localhost:9200',
    'type.name'       = '_doc',
    'key.ignore'      = 'false',
    'schema.ignore'   = 'true',
    'transforms'= 'ExtractTimestamp',
    'transforms.ExtractTimestamp.type'= 'org.apache.kafka.connect.transforms.InsertField$Value',
    'transforms.ExtractTimestamp.timestamp.field' = 'sample_1'
);

错误:

io.confluent.ksql.util.KsqlServerException: org.apache.hc.client5.http.HttpHostConnectException:连接到 http://localhost:8083 [localhost/127.0.0.1] 失败:连接被拒绝 (连接被拒绝)原因: org.apache.hc.client5.http.HttpHostConnectException:连接到 http://localhost:8083 [localhost/127.0.0.1] 失败:连接 拒绝(连接被拒绝) 原因:无法连接到 服务器。请检查服务器详细信息是否正确,并且 服务器正在运行。

【问题讨论】:

    标签: apache-kafka apache-kafka-connect ksqldb


    【解决方案1】:

    这表明您在连接到 Kafka Connect 时错误配置了 ksqlDB 服务器。

    如果您关注that demo script,那么您应该使用the associated Docker Compose file,即configured correctly

          KSQL_KSQL_CONNECT_URL: http://kafka-connect-01:8083
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-01
      • 1970-01-01
      • 2020-07-20
      • 1970-01-01
      • 2021-11-21
      相关资源
      最近更新 更多