ssl - 连接到生产者时出错:错误:ssl.certificate.location 失败
问题描述
环境信息:
操作系统 [例如 Mac、Arch、Windows 10]:Windows10
节点版本 [例如 8.2.1]:10.4.1
NPM 版本 [例如 5.4.2]:6.4.1
node-rdkafka 版本 [eg 2.3.3]:2.5.1
重现步骤
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:
解决方案
推荐阅读
- c++ - 在 C++ 中使用动态分配的问题
- python - 如何从 Homebrew 重新安装 python@2?
- ruby-on-rails - 如何在运行时动态设置 OmniAuth 范围?
- vue.js - Vue 无法导入“wasm”文件
- visual-c++ - 如何根据版本加载 DLL?
- php - 此路由不支持 POST 方法。支持的方法: GET、HEAD 在 laravel 5.8
- javascript - 未定义错误窗口以在节点 js 中定义动态变量
- c++ - 遍历模板参数
- javascript - 将变量从函数传递到函数内的函数
- rabbitmq - 具有有效凭证的非来宾用户拒绝 RabbitMQ Web 管理控制台访问