mosquitto -v运行时报错:Error: Address already in use 的解决办法

mosquitto -v运行时报错:Error: Address already in use 的解决办法

在运行mosquitto时报错:

root@root:/root/lua/lua-5.3.5/src# mosquitto
1548953386: mosquitto version 1.4.10 (build date 2018-11-27 21:39:00+0800) starting
1548953386: Using default config.
1548953386: Opening ipv4 listen socket on port 1883.
1548953386: Error: Address already in use

说明已经有一个mosquitto服务器在运行

root@root:/root/lua/lua-5.3.5/src# ps aux | grep mosquitto
mosquit+   2240  0.2  0.0  34692   120 ?        S    1月30   4:53 mosquitto -v
root      33540  0.0  0.2  21536  1076 pts/0    S+   00:54   0:00 grep --color=auto mosquitto
root@root:/root/lua/lua-5.3.5/src# kill -9 2240
//再次运行
root@root:/root/lua/lua-5.3.5/src# mosquitto
1548953730: mosquitto version 1.4.10 (build date 2018-11-27 21:39:00+0800) starting
1548953730: Using default config.
1548953730: Opening ipv4 listen socket on port 1883.
1548953730: Opening ipv6 listen socket on port 1883.
^C1548953731: mosquitto version 1.4.10 terminating

你可能感兴趣的:(MQTT,Linux)