解决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
相关推荐
国际云,接待34 分钟前
云服务器的运用自如
服务器·架构·云计算·腾讯云·量子计算
无声旅者43 分钟前
深度解析 IDEA 集成 Continue 插件:提升开发效率的全流程指南
java·ide·ai·intellij-idea·ai编程·continue·openapi
Ryan-Joee1 小时前
Spring Boot三层架构设计模式
java·spring boot
Hygge-star1 小时前
【数据结构】二分查找5.12
java·数据结构·程序人生·算法·学习方法
dkmilk1 小时前
Tomcat发布websocket
java·websocket·tomcat
工一木子2 小时前
【Java项目脚手架系列】第七篇:Spring Boot + Redis项目脚手架
java·spring boot·redis
哞哞不熬夜2 小时前
JavaEE--初识网络
java·网络·java-ee
LunarCod2 小时前
Ubuntu使用Docker搭建SonarQube企业版(含破解方法)
linux·运维·服务器·ubuntu·docker·开源·sonarqube
等等5432 小时前
Java EE初阶——wait 和 notify
java·开发语言
API小爬虫3 小时前
淘宝按图搜索商品(拍立淘)Java 爬虫实战指南
java·爬虫·图搜索算法