解决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
相关推荐
开开心心就好42 分钟前
免费轻量电子书阅读器,多系统记笔记听书
linux·运维·服务器·安全·ddos·可信计算技术·1024程序员节
懒惰成性的1 小时前
Java方法的使用
java·开发语言
RisunJan1 小时前
Linux命令-lvreduce (收缩逻辑卷空间)
linux·运维·服务器
wangbing11251 小时前
Java构造函数不能加void
java·开发语言
重生之后端学习1 小时前
207. 课程表
java·数据结构·算法·职场和发展·深度优先
嵌入式×边缘AI:打怪升级日志1 小时前
9.2.1 分析 Write File Record 功能(保姆级讲解)
java·开发语言·网络
阿在在2 小时前
Spring 系列(三):Spring PostProcessor 顶级扩展接口全解析
java·后端·spring
kyrie学java2 小时前
使用SpringBoot框架搭建简易的项目
java·spring boot·spring
袁袁袁袁满2 小时前
Linux命令sudo -i和su root有什么区别吗?
linux·运维·服务器·su root·sudo -i
野犬寒鸦2 小时前
ArrayList扩容机制深度解析(附时序图详细讲解)
java·服务器·数据结构·数据库·windows·后端