解决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
相关推荐
daad777几秒前
USB_抓包
linux·运维·服务器
闻哥16 分钟前
Redis事务详解
java·数据库·spring boot·redis·缓存·面试
hrhcode17 分钟前
【Netty】五.ByteBuf内存管理深度剖析
java·后端·spring·springboot·netty
道亦无名1 小时前
aiPbMgrSendAck
java·网络·数据库
未来之窗软件服务1 小时前
服务器运维(四十)日服务器linux-ps分析工具—东方仙盟
linux·运维·服务器·服务器运维·仙盟创梦ide·东方仙盟
发现你走远了1 小时前
Windows 下手动安装java JDK 21 并配置环境变量(详细记录)
java·开发语言·windows
心 -1 小时前
java八股文DI
java
黎雁·泠崖2 小时前
Java常用类核心详解(一):Math 类超细讲解
java·开发语言
大尚来也2 小时前
跨平台全局键盘监听实战:基于 JNativeHook 在 Java 中捕获 Linux 键盘事件
java·linux
追随者永远是胜利者2 小时前
(LeetCode-Hot100)15. 三数之和
java·算法·leetcode·职场和发展·go