解决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
相关推荐
带刺的坐椅7 分钟前
Hot-Plug 实战:运行期管理 Solon 插件
java·solon·插件·热插拔
大黄说说7 分钟前
SQL Server 执行计划怎么看?快速定位 SQL 慢的根源
java·linux·数据库
Hrain-AI19 分钟前
2026企业AI Agent本地化落地:6平台横评+搭建步骤+成本模板
服务器·网络·人工智能
保卫大狮兄22 分钟前
设备利用率低,到底是设备问题还是排产问题?
大数据·运维·服务器
雪之下雪乃的代码日记1 小时前
Python快速入门(Java开发者版)
java·开发语言·笔记·python
独行侠影a1 小时前
6G研发加速:太赫兹通信与智能超表面如何重塑未来网络?
运维·服务器
敲个大西瓜1 小时前
Springboot核心面试题
java·spring boot·后端
器灵科技1 小时前
Seedance2.5 VS MiniMax H3 同日上线:AI短剧创作者该怎么选?
java·人工智能·阿里云·prompt·aigc
便利店10241 小时前
企业远程办公如何打通内网?网络层隧道与封装直觉
运维·服务器·网络·vpn·隧道
xbgRS1 小时前
Mybatis源码-核心流程及核心类
java·mybatis