700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > 遇到Linux 端口占用时如何查看并杀掉服务进程

遇到Linux 端口占用时如何查看并杀掉服务进程

时间:2020-10-30 17:36:28

相关推荐

遇到Linux 端口占用时如何查看并杀掉服务进程

问题重现

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.16:55:00.252 logback [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - ***************************APPLICATION FAILED TO START***************************Description:Web server failed to start. Port 9904 was already in use.Action:Identify and stop the process that's listening on port 9904 or configure this application to listen on another port.

解决办法

1、查看进程 netstat -apn|grep 9904

[root@hidata2 hiops-executor]# netstat -apn|grep 9904tcp 00 :::9904 :::* LISTEN10768/java

2、杀掉进程

[root@hidata2 hiops-executor]# netstat -apn|grep 9904tcp 00 :::9904 :::* LISTEN10768/java[root@hidata2 hiops-executor]# kill -9 10768

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。