解决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
相关推荐
chian-ocean18 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=20 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
Forget the Dream24 分钟前
设计模式之责任链模式
java·c++·设计模式·责任链模式
jonyleek27 分钟前
「JVS更新日志」低代码、企业会议、智能BI、智能排产2.26更新说明
java·大数据·低代码·数据分析·软件需求
橘子味的茶二29 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
计算机小白一个1 小时前
蓝桥杯 Java B 组之最短路径算法(Dijkstra、Floyd-Warshall)
java·数据结构·算法·蓝桥杯
曼岛_1 小时前
[密码学实战]Java实现SM4加解密(ecb,cbc)及工具验证
java·密码学
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
Forget the Dream1 小时前
设计模式之代理模式
java·c++·设计模式·代理模式