解决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
相关推荐
陌路2034 分钟前
操作系统(15)--进程与线程
linux·运维·服务器
相心缘生34 分钟前
硬核的财税服务公司推荐
服务器
航Hang*1 小时前
第八章:网络系统建设与运维(高级)—— 服务质量
运维·服务器·网络·笔记·ensp
05大叔1 小时前
MybatisPlus
java·服务器·前端
QT 小鲜肉1 小时前
【Linux命令大全】002.文件传输之ftpwho命令(实操篇)
linux·运维·服务器·网络·chrome·笔记
应用市场1 小时前
Linux进程调度与多核CPU深度解析——从内核调度器到实战优化
linux·运维·服务器
java1234_小锋1 小时前
RocketMQ的Producer是如何发送消息的?
java·rocketmq·java-rocketmq
橘色的狸花猫2 小时前
浪漫色彩下的博客系统
java·vue
墨雪不会编程2 小时前
C++【string篇2】:从零基础开始到熟悉使用string类
java·开发语言·c++
Chamico2 小时前
Mosquitto 部署及联调
服务器·mqtt·用户和密码