I have installed mosquitto server and client packages in my ubuntu machine. When I run command "mosquitto" to run the mosquitto server I am getting an error "Error:address already in use". Why am I getting this error? How can I resolve this?
I ran into the same problem, and resolved the situation by killing the process that was running mosquitto. First, locate the mosquitto process id:
ps -ef | grep mosquitto
This should reveal to you any mosquitto related process. Say for example the process id was 12345, then you could kill it with this:
sudo kill 12345
After that the Error:address already in use message was gone and mosquitto was able to run properly again.
The installation on ubuntu automatically starts the broker for you. Try connecting to check it out:
mosquitto_sub -t '$SYS/#' -v
You will need to install the mosquitto-clients
package if you haven't done so already.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With