端口8080已经在eclipse中使用

时间:2017-08-05 10:19:16

标签: spring eclipse apache

当我点击按钮运行时,我试图在 Eclipse氧气上运行一个Spring MVC演示文件>在服务器上运行它会在片刻之后显示以下错误

  

Tomcat v8.5服务器在localhost上所需的端口8080已在使用中。服务器可能已在另一个进程中运行,或者系统进程可能正在使用该端口。要启动此服务器,您需要停止其他进程或更改端口号

9 个答案:

答案 0 :(得分:1)

进程已在侦听端口 8080 ,并且您无法在同一端口上侦听多个进程。

您有两个选项

  1. 如果现有流程无用,请将其杀死 netstat -tulpn | grep :8080

  2. 更改您的应用程序端口。在您的application.properties和文件中添加此行server.port=8081

答案 1 :(得分:1)

  

步骤1 :(打开CMD命令)

  C:\Users\username>netstat -o -n -a | findstr 0.0:8080

  TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 3116

  Now , we can see that LISTENING port is 3116 for 8080 ,

  We need to kill 3116 now
  

第2步: -

 C:\Users\username>taskkill /F /PID 3116

 Step 3: Go to Eclipse and start Server , it will run
  

OR

 you can change port number in folder  servers>Tomcat>server.xml

答案 2 :(得分:0)

在apache conf文件夹中,打开httpd文件并查找8080端口。将8080更改为您喜欢的任何端口。我相信你会在两个地方找到8080

答案 3 :(得分:0)

please kill the java process from task manager if windows, else if linux system kill -9 tomcat

答案 4 :(得分:0)

如果问题仍然存在,您只需更改Tomcat服务器的默认端口即可。

答案 5 :(得分:0)

在将您的war文件部署到tomcat中之前,请务必终止该过程

ps -A|grep tomcat将列出所有tomcat进程。记下PID并运行

KILL <PID>

通过ps -A|grep tomcat进行交叉检查

答案 6 :(得分:0)

我遇到了同样的问题,并且在搜索了答案后如下所示: 1.打开Monitor Tomcat,如下所示:

enter image description here

  1. 只需按下停止,如下图所示:

enter image description here

最后,经过许多试验和建议的解决方案,它可以与我合作。

最好的问候, Kerelos Mikhail

答案 7 :(得分:0)

我的方法是运行tomcat7w.exe以将其禁用。 (仅停止它是不够的)。我的卡巴斯基(反病毒)为Eclipse和Java生成了一些新规则。

答案 8 :(得分:-1)

您可以进入server.xml文件中的服务器> server.xml 。您应该进行如下更改, 步骤1) 第2步) 步骤3)<< strong>连接器端口=“ 8010” 协议=“ AJP / 1.3” redirectPort =“ 8443” />并保存更改。