首页 > 解决方案 > 连接到生产者时出错:错误:ssl.certificate.location 失败

问题描述

环境信息:

重现步骤

node-rdkafka 配置设置:

var producer = new Kafka.Producer({
  'metadata.broker.list': 'ssl-enabled-host:port no',
  'dr_cb': true,
  'security.protocol': 'SSL',
  'ssl.key.location': 'test.key',   //path to the self signed certificate
  'ssl.certificate.location': 'test.crt',  //path to certificate key.
});

附加上下文:

kafka 生产者启用了 SSL。当尝试在元数据中没有安全和 SSL 配置的情况下连接代理时,它会抛出Error:timeout. 因此,继续添加用于启用 ssl 的配置,并在配置中添加 SSL 证书和密钥的路径,如上所述,但这不起作用,或者抛出我无法理解的错误是错误:

连接到生产者时出错:错误:ssl.certificate.location failed: .\ssl\ssl_rsa.c:701: error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:

标签: sslapache-kafkassl-certificatekafka-producer-apinode-kafka-streams

解决方案


推荐阅读