Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

websocket - Mosquitto failed to start on macOS: "Service exited with abnormal code: 3"

I'm trying to start an MQTT broker with websocket on my macOS. So I changed just the following two lines on the conf file /usr/local/etc/mosquitto/mosquitto.conf:

listener 9001
protocol websockets

And I try to run it using brew services start mosquitto -d, but it doesn't work. I checked using netstat -nat | grep 9001, but there is no result, and on the logs file /var/log/system.log I can see the following error:

com.apple.xpc.launchd[1] (homebrew.mxcl.mosquitto[46643]): Service exited with abnormal code: 3 

If I don't make the changes on the conf file that I said, I can run the broker, but without websocket:

> netstat -nat | grep 1883
tcp6       0      0  ::1.1883               *.*                    LISTEN     
tcp4       0      0  127.0.0.1.1883         *.*                    LISTEN  

How can I solve that?


When I try running without homebrew:

> /usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf 
1611655055: mosquitto version 2.0.5 starting
1611655055: Config loaded from /usr/local/etc/mosquitto/mosquitto.conf.
1611655055: Opening websockets listen socket on port 9001.
1611655055: Error: Unable to start any listening sockets, exiting.

My whole conf: https://pastebin.com/hh4fND7D

question from:https://stackoverflow.com/questions/65898651/mosquitto-failed-to-start-on-macos-service-exited-with-abnormal-code-3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[1] html - How to create even cell spacing within a

2.1m questions

2.1m answers

60 comments

57.0k users

...