栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

linux报错 --- Failed to start bean ‘webServerStartStop‘; nested exception is org.springframework.

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

linux报错 --- Failed to start bean ‘webServerStartStop‘; nested exception is org.springframework.

环境:window10、CentOs7.5.1804

专栏:linux_debug

linux_debug:Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.
  • 1.错误信息
  • 2. 问题说明
  • 3.解决方法
    • 3.1 windows
    • 3.2 linux

1.错误信息
2022-07-08 18:12:25.088 ERROR 33600 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.21.jar!/:5.3.21]
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.21.jar!/:5.3.21]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.21.jar!/:5.3.21]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_333]
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.21.jar!/:5.3.21]
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.21.jar!/:5.3.21]
2. 问题说明

在linux上运行springboot项目打成的jar包时;

  • 出现上述问题,说明8080端口被占用;
3.解决方法

关闭被占用的8080端口;

3.1 windows
  • 在cmd中输入
# 找到对应的pid
netstat -ano | findstr 8080

## out:TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 6148
  • 关闭端口对应的pid号,假设端口8080对应的是进程号为123的进程号
taskkill /pid 6148 -t -f
3.2 linux
  • 在cmd中输入
# 找到对应的pid
netstat -ano | grep 8080

## out:TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 6148
  • 关闭端口对应的pid号,假设端口8080对应的是进程号为123的进程号
kill -9 PID 123
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1007980.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号