Mosquitto Service issue on Windows

假装没事ソ 提交于 2019-12-13 20:15:47

问题


After I made changes to the mosquitto.conf file for adding TLS support, I restarted the Mosquitto Broker service but its not starting. The error says the Mosquitto Service started on Local computer and then stopped -

# MQTT over TLS
listener 8883
cafile C:Program Files (x86)mosquittocertificatesca.crt
certfile C:Program Files (x86)mosquittocertificatesserver.crt
keyfile C:Program Files (x86)mosquittocertificatesserver.key

This error also occurs when I made changes to the mosquitto.conf file-

listener 9001 0.0.0.0
protocol websockets

I am using a Windows 10 machine. Did anyone face this problem?


回答1:


As worked through in the comments.

The paths to the certificates need to have the correct path separators '\' included and as they contain spaces should be wrapped in quotes. e.g.

# MQTT over TLS
listener 8883
cafile "C:\Program Files (x86)\mosquitto\certificates\ca.crt"
certfile "C:\Program Files (x86)\mosquitto\certificates\server.crt"
keyfile "C:\Program Files (x86)\mosquitto\certificates\server.key"

Also the pre-built version of mosquitto for Windows does not include websocket support. If you need websocket support you will have to built it from the source yourself and build and include the libwebsocket dependency.



来源:https://stackoverflow.com/questions/46049035/mosquitto-service-issue-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!