address already in use error in mosquitto

自闭症网瘾萝莉.ら 提交于 2020-12-02 07:17:11

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/30207649/address-already-in-use-error-in-mosquitto

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