解决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
相关推荐
好家伙VCC1 小时前
【无标题】
java
小碗羊肉2 小时前
【JavaWeb | 第十一篇】文件上传(本地&阿里云OSS)
java·阿里云·servlet
吾疾唯君医2 小时前
Java SpringBoot集成积木报表实操记录
java·spring boot·spring·导出excel·积木报表·数据文件下载
Byron Loong2 小时前
【c++】为什么有了dll和.h,还需要包含lib
java·开发语言·c++
大明者省3 小时前
宝塔开了端口,Ubuntu 还得开相应端口才能打通
服务器·数据库·ubuntu
syagain_zsx3 小时前
Linux指令初识(实用篇)
linux·运维·服务器
hexu_blog3 小时前
vue+java实现图片批量压缩
java·前端·vue.js
头歌实践平台3 小时前
Hadoop开发环境搭建
java·大数据·hadoop
Seven973 小时前
一致性Hash算法:如何实现分布式系统中的高效数据分片?
java
摇滚侠3 小时前
IDEA 生成 try catch 快捷键
java·ide·intellij-idea