MQTT无法在HTTPS服务器中运行

时间:2017-06-08 10:40:16

标签: websocket wss mosquitto

我们在HTTPS服务器中遇到MQTT连接问题。有时它工作正常,有时候会出现如下错误。

与'wss:// MYHOST:8083 / mqtt'的WebSocket连接失败:连接建立错误:net :: ERR_INSECURE_RESPONSE

让我与您分享我的mosquitto.conf文件。

  

pid_file /var/run/mosquitto.pid
  坚持真实的   persistence_location / var / lib / mosquitto /
  log_dest文件/var/log/mosquitto/mosquitto.log
  include_dir /etc/mosquitto/conf.d
  听众1883年

     听众8083
  协议websockets
  certfile /etc/mosquitto/certs/myhost.crt
  cafile /etc/mosquitto/certs/ca.crt
  keyfile /etc/mosquitto/certs/myhost.key

我的Mosquitto WebSocket配置文件:

  

host ='MYHOST'; //主机名或IP地址
  port = 8083;
  topic ='TOPIC'; //订阅的主题
  useTLS = true;
  username =“”;
  密码=“”;
  path =“/ mqtt”;
  cleansession = true;

感谢。

0 个答案:

没有答案
相关问题