解决The Tomcat connector configured to listen on port 8080 failed to start

问题

启动javar报错,提示如下

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.

2024-02-04 11:57:51.189 INFO 6064 --- main o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'

Process finished with exit code 1

解决方案

  1. 调出命令终端

    win+r 并且输入cmd

  2. 查看某个端口(8080)的被占用情况

    netstat -ano |findstr 8080

显示

复制代码
C:\Users\gusijin>netstat -ano |findstr 8080
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       17244
  TCP    192.168.10.122:60391   14.116.242.250:8080    ESTABLISHED     14908
  TCP    [::]:8080              [::]:0                 LISTENING       17244
  TCP    [::1]:8080             [::1]:55341            TIME_WAIT       0
  TCP    [::1]:8080             [::1]:55342            TIME_WAIT       0

C:\Users\gusijin>taskkill -PID 14908 -F
成功: 已终止 PID 为 14908 的进程。
  1. 根据进程号(14908)关闭进程即可

    taskkill -PID 14908-F

tasklist | findstr 17244

显示

java.exe 17244 Console 3 188,908 K

杀掉该进程 再次启动就OK啦

bash 复制代码
taskkill /f /t /im java.exe
相关推荐
LabVIEW开发16 小时前
Ethernet/IP 会话无效 -251723770
服务器·网络协议·tcp/ip
大胖爱学习_MJ18 小时前
超越向量检索:用 Spring Boot + Neo4j 手搓 GraphRAG 知识图谱记忆
java·后端·python
吃我一窝jio18 小时前
Java博客极简写作三支柱
java
知识搬运临时工18 小时前
双路服务器跑得比单路慢:JVM 没看见内存的距离
java·后端
吃我一窝jio19 小时前
Java Bug复盘与性能优化实战
java·开发语言·笔记
Huangjin007_19 小时前
【Linux 系统篇(四十一)】线程(二):线程的优缺点、资源共享与上下文切换
linux·运维·服务器
Flynn Liang19 小时前
Java 序列化也能成为瓶颈:Jackson、Protobuf 与 Redis 序列化的生产实践
java·redis·性能优化·jackson·序列化·protobuf
Yeats_Liao19 小时前
物联网平台优化系列(三):全局懒加载吞掉 MQTT 初始化
java·物联网·struts
千寻技术帮19 小时前
基于Spring Boot+Vue的农产品销售管理系统(源码+文档+数据库,附部署教程)
java·数据库·spring boot·后端·mysql·vue
好用斋19 小时前
拾光坞G2使用新版Docker懒人包:一键安装、一键升级、一键卸载
java·docker·容器