ssl - 带有 SSL/TLS 错误 : Unable to load server key file 的 MQTT 服务器

标签 ssl mqtt tls1.2

我正在尝试使用 SSL 设置 MQTT 代理。当我启动代理时,出现此错误:

1452342536: Error: Unable to load server key file "/home/ilab/mqtt/server/server.key". Check keyfile.

以下是我的mosquitto.conf:

pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
cafile /home/ilab/mqtt/CA/ca.crt
certfile /home/ilab/mqtt/server/server.crt
keyfile /home/ilab/mqtt/server/server.key
port 8883
tls_version tlsv1

我也遵循了THIS中提到的步骤问题。但是还是没有解决问题。

最佳答案

正如@hardillb 所暗示的,尝试删除密码或手动启动代理。

或者,如果您使用的是 Ubuntu,则 apparmor 可能会限制对这些文件的访问。尝试将它们放在 /etc/mosquitto/certs 中。

关于ssl - 带有 SSL/TLS 错误 : Unable to load server key file 的 MQTT 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34693520/

相关文章:

ios - MQTT-Client-Framework 在后台保持运行

node.js - 测试 RabbitMQ/MQTT 性能

c# - 为什么在 WCF 应用程序的 Web.config 文件中添加 httpRuntime targetFramework 可以解决与 TLS 相关的连接问题?

c# - 正确地自动创建用于开发的自签名证书

google-cloud-platform - 是否可以在 Google Cloud 中安装代理 MQTT?

ssl - 我如何在 Mule 中设置密码套件

c# - SslStream:处理证书时发生未知错误

perl - IO::Socket::SSL 读取和写入的实际字节数

ssl - 我怎么知道证书实际上来 self 的目标 IP 地址?

linux - 提示从客户端 linux 机器接受 WAS 的 DMGR 签名者证书的脚本