8080 端口已在 eclipse 中使用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45520774/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 23:27:50  来源:igfitidea点击:

Port 8080 already in use in eclipse

springeclipseapache

提问by Mr. A

I am trying to run a Spring MVC demo file on Eclipse oxygenwhen I hit the button run as> run on server it shows the following error after a moment

我正在尝试在Eclipse 氧气上运行 Spring MVC 演示文件,当我点击按钮 run as> run on server 它稍后显示以下错误

Port 8080 required by Tomcat v8.5 Server at localhost is 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)

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

回答by chethu

Step 1: (open the CMD command)

第一步:(打开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

Step 2:-

第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

回答by Martin Choraine

A process is already listening on port 8080and you can't have more than one process listening on the same port.

一个进程已经在侦听端口8080,并且在同一个端口上侦听的进程不能超过一个。

You have two options:

你有两个选择

  1. Kill the existing process if it's not usefull netstat -tulpn | grep :8080

  2. Change you application port. In your application.properties and file add this line server.port=8081

  1. 如果它没有用,则杀死现有进程 netstat -tulpn | grep :8080

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

回答by Herelo

in your apache conf folder, open the httpd file and look for 8080 port. Change 8080 to any port you like. I believe you will find 8080 on two places

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

回答by Dilip

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

如果windows,请从任务管理器中杀死java进程,否则如果linux系统kill -9 tomcat

回答by Udyan Sharma

You can just change the default port of your Tomcat server if the problem persists.

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

回答by Chandra shekhar

Always Kill the process before deploying your war file in tomcat

在 tomcat 中部署 war 文件之前总是终止进程

ps -A|grep tomcatIt will list all tomcat process. Note Down the PID and run

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

KILL <PID>

KILL <PID>

Cross check by ps -A|grep tomcat

交叉检查 ps -A|grep tomcat

回答by Kerelos

I face the same problem and after searching the answer as shown below: 1. open Monitor Tomcat as shown below:

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

enter image description here

在此处输入图片说明

  1. Simply press stop as shown in below picture:
  1. 只需按下停止键,如下图所示:

enter image description here

在此处输入图片说明

Finally it works with me after many trials and suggested solutions.

经过多次试验和建议的解决方案,最终它与我一起工作。

Best Regards, Kerelos Mikhail

最好的问候, Kerelos Mikhail

回答by mango

My method is to run tomcat7w.exe to disable it. (Only Stopping it is not enough). And my Kaspersky (Anti virus) generate some new rules for eclipse and java.

我的方法是运行 tomcat7w.exe 来禁用它。(仅停止它是不够的)。我的卡巴斯基(防病毒)为eclipse和java生成了一些新规则。

回答by jenvi

you can go in servers > server.xml.in server.xml file u should changes like, step 1) step 2) step 3) <Connector port="8010"protocol="AJP/1.3" redirectPort="8443"/> and save the changes .

你可以进入服务器 > server.xml.in server.xml 文件你应该改变,步骤 1) 步骤 2) 步骤 3) < Connector port="8010"protocol="AJP/1.3" redirectPort="8443"/>并保存更改。