美文网首页
windows解决The Tomcat connector co

windows解决The Tomcat connector co

作者: ChinaGoodStaff | 来源:发表于2020-06-06 09:27 被阅读0次
org.springframework.boot.context.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 8097 failed to start
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.checkThatConnectorsHaveStarted(TomcatEmbeddedServletContainer.java:222)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:198)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
    at cn.lll.IICAppFileWeb.main(IICAppFileWeb.java:23)
2020-06-04 16:41:05.743 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter - 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8097 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 8097, or configure this application to listen on another port.

运行java调试时一直不成功,一看时端口号8097被占用了,一脸懵逼,问了一下度娘。总结如下方法

解决办法
1.打开cmd命令窗口 输入指令查看所有端口和PID
netstat -ano
image.png
2.找到对应的端口对应的PID 输入指令找到对应的进程
tasklist | findstr "7620"
image.png
3.杀掉该进程
 taskkill /f /t /im java.exe
image.png
4.再次重新启动程序就可以了

相关文章

网友评论

      本文标题:windows解决The Tomcat connector co

      本文链接:https://www.haomeiwen.com/subject/alxnzhtx.html