簡體   English   中英

配置SSL mosquitto錯誤

[英]Config SSL mosquitto error

我嘗試按照這些步驟為mostquitto配置SSL。

當我重啟mosquitto時,出現錯誤:

1435120150: mosquitto version 1.4.2 (build date Mon, 18 May 2015 15:25:19 +0100) starting

1435120150: Config loaded from /etc/mosquitto/mosquitto.conf.

1435120150: Opening ipv4 listen socket on port 8883.

1435120150: Error: Unable to create TLS context.

這是我的mosquitto配置:

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

bind_address Dell
port 8883
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/certs/Dell.crt
keyfile /etc/mosquitto/certs/Dell.key
tls_version tlsv1

如何正確配置?

Unable to create TLS context表明對SSL_CTX_new()的調用失敗。 這是在為偵聽套接字設置SSL選項的開始,這是非常意外的。

您可以做的唯一事情就是檢查您的openssl版本,以及更改/刪除tls_version選項。 刪除它是最好的選擇,除非您有特殊原因禁止TLSv1.1或TLSv1.2(或將來的TLSv1.3)。

請檢查客戶端系統時間和ssl證書結束日期,客戶端系統時間必須介於ssl證書開始時間和結束時間之間

檢查客戶端系統日期:

日期

檢查openssl證書結束日期:

openssl x509 -enddate -noout -in cacert.pem

另一種解決方案......針對[不同]具體原因。

對於錯誤“錯誤:問題設置TLS選項”,一個特定的原因被修復如下:

- 在mosquitto配置文件中,帶有cert,key和CA文件名的配置參數行在每個文件名之后以及行尾字符之前包含“空格”字符。

- 刪除行尾字符之前的空格導致錯誤不再出現。

- 然后蚊子經紀人開始沒有錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM