简体   繁体   中英

How to stop Mosquitto service running under macOS Big Sur

Under macOS Big Sur I started a Mosquitto broker service from the command line:

/usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf

Now I would like to change the mosquito.conf file and check for changes.

My issue is that if I execute the same command again, I get the following status messages:

1615884201: mosquitto version 2.0.9 starting
1615884201: Config loaded from /usr/local/etc/mosquitto/mosquitto.conf.
1615884201: Opening ipv6 listen socket on port 1883.
1615884201: Opening ipv4 listen socket on port 1883.
1615884201: Opening ipv4 listen socket on port 1883.
1615884201: Error: Address already in use

Furthermore, I cannot see any mosquitto service (eg by ps aux | grep mosquitto ).

Where is the process hidden and how do I stop it?

You select the terminal that mosquitto is running in and then press and hold down the control key while press c .

If you've managed to launch mosquitto in the background you can use ps to find the process id and then use kill <pid> to stop the broker.

You can only run one instance at a time that uses the same port numbers on any given interface.

Binding to 0.0.0.0 is just short hand for bind to all interfaces, but it's still going to be dependant on which port numbers you are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM