解决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
相关推荐
小王师傅666 分钟前
【轻松入门SpringBoot】从 0 到 1 搭建 SpringBoot 工程-中
java·spring boot·spring
豐儀麟阁贵27 分钟前
9.5格式化字符串
java·开发语言·前端·面试
qq_348231851 小时前
Spring Boot开发过程中常见问题
java·spring boot·后端
程序修理员1 小时前
java+vue实现文件下载进度条
java·开发语言·vue.js
毕设源码-赖学姐1 小时前
【开题答辩全过程】以 高校教师管理系统设计与实现为例,包含答辩的问题和答案
java·eclipse
不会代码的小猴1 小时前
C++的第十一天笔记
java·前端·jvm
雨中飘荡的记忆1 小时前
Javassist实战
java
@YDWLCloud1 小时前
用腾讯云国际版搭建全球加速架构:5 分钟实现多地访问提速
服务器·架构·云计算·github·腾讯云
陈文锦丫1 小时前
微服务-----
java·数据库·微服务