报错日志:
[2020-12-30 14:14:05.894] 0.stdout.ERROR #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:Failed to start connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:256)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:300)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at com.gt.crm.GtCrmApplication.main(GtCrmApplication.java:69)
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1020)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 13 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)
... 14 common frames omitted
[2020-12-30 14:14:05.899] 0.stdout.INFO #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:Pausing ProtocolHandler ["http-nio-8080"]
[2020-12-30 14:14:05.899] 0.stdout.INFO #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:Stopping service [Tomcat]
[2020-12-30 14:14:05.908] 0.stdout.WARN #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:The web application [ROOT] appears to have started a thread named [RxIoScheduler-1 (Evictor)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
[2020-12-30 14:14:05.909] 0.stdout.WARN #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
[2020-12-30 14:14:05.911] 0.stdout.INFO #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:The stop() method was called on component [StandardServer[-1]] after stop() had already been called. The second call will be ignored.
[2020-12-30 14:14:05.911] 0.stdout.INFO #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:Stopping ProtocolHandler ["http-nio-8080"]
[2020-12-30 14:14:05.911] 0.stdout.INFO #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:Destroying ProtocolHandler ["http-nio-8080"]
[2020-12-30 14:14:05.919] 0.stdout.ERROR #traceId:0 host:0 from:0 uri:0 clientIp:0 rpcId:0 userId:0 totalTime:0 asyncTime:0 file:0 sqlCostTime:0 requestParams: requestBodys: responseResults: line:0 msg:
***************************
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.
本例是占用的8080端口,其他端口处理方式也同理:
- Windows+R 打开命令窗口输入cmd
- 窗口里敲命令:
netstat -ano //查看系统当前所有的端口使用情况
如图:
netstat -ano |findstr "8080"//8080换成你想查看的端口号
查看到对应的进程id之后
- 打开任务管理器,如图,选择和id相等的PID,然后结束进程,就ok了