ERROR | Web server failed to start. Port 8080 was already in use.

错误提示:

java 复制代码
***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.


Process finished with exit code 1

解决方法:

1、确定监听端口8080的进程ID(PID)

java 复制代码
sudo netstat -tulnp | grep :8080
或
sudo lsof -i :8080

2、终止该进程

java 复制代码
sudo kill -9 PID

其中PID是上一步获取到的监听端口8080的进程ID。

如果你想要配置某个服务在启动时不要监听8080端口,你需要查看该服务的配置文件,并根据服务的具体配置方式进行修改。例如,如果是Apache服务器,你可能需要编辑httpd.conf或者相应的虚拟主机配置文件,将监听端口更改为其他未被使用的端口。

请注意,使用kill -9可能不会给予该进程任何清理自身和优雅关闭的机会,应当在确保安全的前提下使用。如果可能,首选使用kill PID来让进程自行关闭。

相关推荐
小马爱打代码2 小时前
Spring Boot:模块化实战 - 保持清晰架构
java·spring boot·架构
青青草原技术员灰太狼2 小时前
Nginx的https搭建
linux·服务器·网络
小坏讲微服务2 小时前
SpringBoot4.0整合knife4j 在线文档完整使用
java·spring cloud·在线文档·knife4j·文档·接口文档·swagger-ui
xu_yule2 小时前
网络和Linux网络-4(应用层)序列化和反序列化(网络计算器)
linux·网络
8***Z892 小时前
springboot 异步操作
java·spring boot·mybatis
i***13243 小时前
Spring BOOT 启动参数
java·spring boot·后端
坚持不懈的大白3 小时前
后端:SpringMVC
java
IT_Octopus3 小时前
(旧)Spring Securit 实现JWT token认证(多平台登录&部分鉴权)
java·后端·spring
kk哥88993 小时前
Spring详解
java·后端·spring
S***26753 小时前
Spring Cloud Gateway 整合Spring Security
java·后端·spring