springboot启动dubbo时端口占用,但相关端口项目已经关闭,还是显示端口占用

参考:https://blog.csdn.net/qq_41723615/article/details/88641959

...can not bind port 20881
...
Caused by: java.net.BindException: Address already in use: bind

异常的意思是20881端口已经被绑定,无法绑定端口20881

此异常为springboot启动异常,tomcat端口已经启动了,占用了,把后台tomcat关闭即可:

在cmd命令窗口:

1.输入 netstat -ano|findstr 8005,回车,显示在最后面的数字就是我们tomcat进程的端口号。

2.输入 taskkill /pid xxxx /f    xxxx就是我们的端口号,回车,终止!

终止不了:则输入 tasklist | findstr  进程号 查看是哪个进程,在运行,在任务管理器把它关了即可。

猜你喜欢

转载自www.cnblogs.com/acelance/p/12468106.html
今日推荐