ERROR 14764 --- [ main] o.apache.catalina.core.StandardService : Failed to start connect
ERROR 14764 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-9001]]
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-9001]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:261) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:300) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) [spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at com.daqin.demo251001.Demo251001Application.main(Demo251001Application.java:12) [classes/:na]
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1020) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
... 13 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_411]
at sun.nio.ch.Net.bind(Net.java:438) ~[na:1.8.0_411]
at sun.nio.ch.Net.bind(Net.java:430) ~[na:1.8.0_411]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225) ~[na:1.8.0_411]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_411]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:219) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1151) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018) ~[tomcat-embed-core-8.5.34.jar:8.5.34]
... 14 common frames omitted
2025-10-02 18:31:35.411 INFO 14764 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2025-10-02 18:31:35.417 INFO 14764 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2025-10-02 18:31:35.419 ERROR 14764 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 9001 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 9001, or configure this application to listen on another port.
根据错误日志分析,这是端口占用问题。以下是解决方案:
## 错误分析
- **根本原因**:端口 `9001` 已被其他进程占用
- **错误信息**:`java.net.BindException: Address already in use: bind`
## 解决方案
### 1. 更换端口(推荐)
修改 [application.yml](file://D:\SUM\代码\demo251001\src\main\resources\application.yml) 文件中的端口配置:
```yaml
server:
port: 9002 # 或其他未被占用的端口
```
### 2. 查找并终止占用端口的进程
在命令行中执行以下命令:
**Windows系统:**
```bash
# 查找占用9001端口的进程
netstat -ano | findstr :9001
# 根据PID终止进程
taskkill /PID <进程ID> /F
```
**Linux/Mac系统:**
```bash
# 查找占用9001端口的进程
lsof -i :9001
# 或者
netstat -tulpn | grep :9001
# 终止进程
kill -9 <进程ID>
```
### 3. 重启应用
完成上述操作后重新启动 [Demo251001Application](file://D:\SUM\代码\demo251001\src\main\java\com\daqin\demo251001\Demo251001Application.java#L6-L14) 应用。
**建议优先采用方案1**,简单快捷且不会影响其他正在运行的服务。
更多推荐



所有评论(0)