今天跑项目的时候Eclipse卡死,重启后报Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).说明8080端口被占了,百度了一番后解决
步骤一:进入cmd,输入netstat -ano或者直接netstat -aon|findstr “端口号”,此时能看到你的端口状态
步骤二:tasklist|findstr “查询出的 listening”,就是listening后面的数字,我的是17188,所以是tasklist|findstr “17188”
步骤三:taskkill /f /t /im 查询出占用程序名称,比如taskkill /f /t /im javaw.exe
这样就能kill掉进程了,此时Eclipse会退出,可以到任务管理器里把javaw.exe杀掉,如果你的项目要跑redis,redis也会退出,重新开就可以了,我这里犯了一个错误,直接开启redis发现连不上,报错由于目标计算机积极拒绝,无法连接,此时只需要先开启redis server,打开cmd到redis下输入redis-server.exe redis.windows.conf,然后再开redis-cli就可以了。记录一下,方便日后忘记
记录一次Tomcat端口被占用问题
最新推荐文章于 2023-04-09 07:17:02 发布