天天看点

Address already in use: bind 端口被占用的解决办法

经常出现Address already in use: bind 端口被占用的现象

1.启动cmd, 执行命令netstat -ano|findstr 1883 ,会查询出占用端口号的进程号

Address already in use: bind 端口被占用的解决办法

2、输入tasklist|findstr “5836”,回车,查看是哪个进程或者程序占用了1883端口,结果是:mosquitto.exe

Address already in use: bind 端口被占用的解决办法

3、打开任务管理器关闭进程就可以了。

或者在第一步知道进程ID后,taskkill -f -pid 进程ID

还可以根据 exe名称,杀进程,命令如下:

taskkill /im mosquitto.exe /f