地址已经在mosquitto使用错误

时间:2022-09-22 20:11:19

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?

我在我的ubuntu机器上安装了mosquitto服务器和客户端软件包。当我运行命令“mosquitto”来运行mosquitto服务器时,我收到错误“错误:地址已在使用中”。为什么我收到此错误?我该如何解决这个问题?

2 个解决方案

#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:

我遇到了同样的问题,并通过杀死运行mosquitto的进程解决了这个问题。首先,找到mosquitto进程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:

这应该向您揭示任何与蚊子有关的过程。比如说进程ID是12345,然后你可以用它来杀死它:

sudo kill 12345

After that the Error:address already in use message was gone and mosquitto was able to run properly again.

之后,错误:地址已经在使用消息已经消失,mosquitto能够再次正常运行。

#2


The installation on ubuntu automatically starts the broker for you. Try connecting to check it out:

ubuntu上的安装会自动为您启动代理。尝试连接以查看它:

mosquitto_sub -t '$SYS/#' -v

You will need to install the mosquitto-clients package if you haven't done so already.

如果您还没有安装mosquitto-clients软件包,则需要安装它。

#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:

我遇到了同样的问题,并通过杀死运行mosquitto的进程解决了这个问题。首先,找到mosquitto进程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:

这应该向您揭示任何与蚊子有关的过程。比如说进程ID是12345,然后你可以用它来杀死它:

sudo kill 12345

After that the Error:address already in use message was gone and mosquitto was able to run properly again.

之后,错误:地址已经在使用消息已经消失,mosquitto能够再次正常运行。

#2


The installation on ubuntu automatically starts the broker for you. Try connecting to check it out:

ubuntu上的安装会自动为您启动代理。尝试连接以查看它:

mosquitto_sub -t '$SYS/#' -v

You will need to install the mosquitto-clients package if you haven't done so already.

如果您还没有安装mosquitto-clients软件包,则需要安装它。