目录
- 一、异常错误
- 二、原因
- 三、解决方法
一、异常错误
- Spring-boot启动
Run
时,出现o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
错误
*************************** APPLICATION FAILED TO START
Description:
The Tomcat connector configured to listen on port 8080 failed to
start. The port may already be in use or the connector may be
misconfigured.Action:
Verify the connector’s configuration, identify and stop any process
that’s listening on port 8080, or configure this application to listen
on another port.2023-01-03 12:12:42 [restartedMain] INFO
o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext -
Closing
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@611a84d8:
startup date [Tue Jan 03 20:12:35 CST 2023]; root of context hierarchy
2023-01-03 12:12:42 [restartedMain] INFO
o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on
shutdown 2023-01-03 12:12:42 [restartedMain] INFO
o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
Disconnected from the target VM, address: ‘127.0.0.1:14533’,
transport: ‘socket’
***************************
APPLICATION FAILED TO START
***************************Description:The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.Action:Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.2023-01-03 12:12:42 [restartedMain] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@611a84d8: startup date [Tue Jan 03 20:12:35 CST 2023]; root of context hierarchy
2023-01-03 12:12:42 [restartedMain] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2023-01-03 12:12:42 [restartedMain] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
Disconnected from the target VM, address: '127.0.0.1:14533', transport: 'socket'
二、原因
- Tomcat 的默认8080端口被占用
三、解决方法
- cmd输入
netstat -ano|findstr 8080
,找到占用8080端口的进程 - 列对应的分别是:协议-本地地址-外部地址-状态-PID
- 输入
taskkill /f /pid PID
终止8080端口进程,此例PID为5476,故输入taskkill /f /pid 5476
- 或者打开任务管理器,找到PID为5476的进程将其结束
- 重新Spring-boot启动
Run
,一直转圈但未报出SEVERE: Failed
异常,表示Tomcat是正常运行的,打开浏览器输入访问地址即可