MQTT Host name verification failure (SSL)-增加--insecure选项解决

增加一个选项即可解决:--insecure

出问题:

mosquitto_pub -d -h 192.168.1.10 -p 1883 -t hello -m 123 --cafile ~/cacert.pem
Client null sending CONNECT
Error: host name verification failed.
OpenSSL Error[0]: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Error: Protocol error

解决:

mosquitto_pub -d -h 192.168.1.10 -p 1883 -t hello -m 123 --cafile ~/cacert.pem --insecure
Client null sending CONNECT
Client null received CONNACK (0)
Client null sending PUBLISH (d0, q0, r0, m1, 'hello', ... (3 bytes))
Client null sending DISCONNECT

参考:https://community.home-assistant.io/t/mqtt-host-name-verification-failure-ssl/337356

posted @ 2022-10-24 15:59  船长博客  阅读(151)  评论(0编辑  收藏  举报
永远相信美好的事情即将发生!