error running 'index.jsp' address localhost:8080 is already in use

OS环境:Linux

1、当我在idea上运行项目时,出现 error running ‘index.jsp’ address localhost:8080 is already in use
error running 'index.jsp' address localhost:8080 is already in use

2、在命令行中查看8080端口占用情况:
error running 'index.jsp' address localhost:8080 is already in useerror running 'index.jsp' address localhost:8080 is already in use3、分析
可能是由于在命令行中,我已经使用(startup.sh)开启了tomcat服务,占用了8080。在idea中运行web项目时,会自动开启tomcat服务,所以会出现端口冲突的错误。

4、解决:
在命令行中关闭tomcat,使用绝对路径或者相对路径来运行shutdown.sh
error running 'index.jsp' address localhost:8080 is already in use