eclipse 端口 8080 已在使用中的错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4146401/
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
Error With Port 8080 already in use
提问by Daniel Tascón
Can anyone help me to solve the following case?
谁能帮我解决以下情况?
I am trying to generate my first web site using java and working with Eclipse Galileo running on Ubuntu 9.10. Since I generate my first lines of code I haven't seen the web. All the time when I try to run the program I get the following error:
我正在尝试使用 java 生成我的第一个网站,并使用在 Ubuntu 9.10 上运行的 Eclipse Galileo。因为我生成了我的第一行代码,所以我还没有看到网络。当我尝试运行该程序时,总是出现以下错误:
Several ports (8080, 8080) required by Tomcat v6.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).
本地主机上的 Tomcat v6.0 服务器所需的几个端口(8080、8080)已经在使用中。服务器可能已经在另一个进程中运行,或者系统进程可能正在使用该端口。要启动此服务器,您需要停止其他进程或更改端口号。
I have read a lot about the way to change the ports for my tomcat (pass from the 8080 to 80) but it has been impossible. I read some forums where the way to solve this problem is going to the file that contents the server number for tomcat, which is a XML file, but when I open the folder there is not a xml file with the name.
我已经阅读了很多关于更改我的 tomcat 端口的方法(从 8080 到 80),但这是不可能的。我阅读了一些论坛,其中解决此问题的方法是转到包含 tomcat 服务器编号的文件,该文件是一个 XML 文件,但是当我打开该文件夹时,没有一个带有该名称的 xml 文件。
I already explored the port using sudo lsof -n -P -i
:, start and shut-down tomcat but the mistake is still there.
我已经使用sudo lsof -n -P -i
:、启动和关闭 tomcat探索了端口,但错误仍然存在。
What can I do?
我能做什么?
Thanks a lot.
非常感谢。
采纳答案by Maximus
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. Restart your server to see changes.
在您的 apache conf 文件夹中,打开 httpd 文件并查找 8080 端口。将 8080 更改为您喜欢的任何端口。我相信你会在两个地方找到 8080。重新启动服务器以查看更改。
回答by Sobha
Click on servers tab in eclipse and then double click on the server listed there. Select the port tab in the config page opened.Change the port to any other ports.Restart the server.
单击 eclipse 中的服务器选项卡,然后双击此处列出的服务器。在打开的配置页面中选择端口选项卡。将端口更改为任何其他端口。重新启动服务器。
回答by yimi404
on Mac, how I usually solve it
在 Mac 上,我通常如何解决它
- open terminal and cd to downloaded-apache-files-folder/bin (i.e to the folder where shutdown.sh file is located)
- enter "sh shutdown.sh" as a terminal command
- restart Tomcat/Eclipse..tada!
- 打开终端并cd到downloaded-apache-files-folder/bin(即shutdown.sh文件所在的文件夹)
- 输入“sh shutdown.sh”作为终端命令
- 重启 Tomcat/Eclipse..tada!
Hope this helps OP or someone else reading
希望这有助于 OP 或其他人阅读
回答by mothmonsterman
if you are running from inside eclipse with wtp, you should be able to change the port from the "servers" view (window -> show view -> servers)
如果您使用 wtp 从 eclipse 内部运行,您应该能够从“服务器”视图(窗口 -> 显示视图 -> 服务器)更改端口
回答by Manam
It has been long time, but I faced the same Issue, and solved it as follow: 1. tried shutting down the application server using the shutdown.bat/.bash which might be in your application Server / bin/shutdown..
已经很长时间了,但我遇到了同样的问题,并解决了以下问题: 1. 尝试使用shutdown.bat/.bash 关闭应用服务器,它可能在您的应用服务器/bin/shutdown..
- My Issue, was that more than 1 instance of java was running, I was changing ports, and not looking back, so it kept running other java processes, with that specific port. for windows users, : ALT+Shift+Esc, and end java processes that you are not using and now you should be able to re-use your port 8080
- 我的问题是,有 1 个以上的 java 实例正在运行,我正在更改端口,而不是回头看,因此它继续使用该特定端口运行其他 java 进程。对于 Windows 用户,:ALT+Shift+Esc,并结束您没有使用的 java 进程,现在您应该能够重新使用您的端口 8080
回答by shrijit
You've another instance of Tomcat already running. You can confirm this by going to http://localhost:8080in your webbrowser and check if you get the Tomcat default home page or a Tomcat-specific 404 error page. Both are equally valid evidence that Tomcat runs fine; if it didn't, then you would have gotten a browser specific HTTP connection timeout error message.
您已经运行了另一个 Tomcat 实例。您可以通过在 Web 浏览器中访问http://localhost:8080来确认这一点,并检查您是否获得了 Tomcat 默认主页或特定于 Tomcat 的 404 错误页面。两者都是 Tomcat 运行良好的同样有效的证据;如果没有,那么您将收到特定于浏览器的 HTTP 连接超时错误消息。
You need to shutdown it. Go to /bin subfolder of the Tomcat installation folder and execute the shutdown.bat (Windows) or shutdown.sh (Unix) script.
你需要关闭它。转至Tomcat 安装文件夹的/bin 子文件夹并执行shutdown.bat (Windows) 或shutdown.sh (Unix) 脚本。
check this answerfor more information.
检查此答案以获取更多信息。
回答by Kedar1442
This Worked for me > In Eclipse NEON double clicked on Server tab which redirects server overview window
这对我有用> 在 Eclipse NEON 中双击服务器选项卡,重定向服务器概览窗口
Here you can change port number based on your requirement for Tomcat Admin and HTTP port.
您可以在此处根据您对 Tomcat Admin 和 HTTP 端口的要求更改端口号。
And restarted the server.
并重新启动了服务器。
Hope this helps you.
希望这对你有帮助。
回答by vishwampandya
I faced a similar problem , here's the solution.
我遇到了类似的问题,这是解决方案。
Step 1 :Double click on the server listed in Eclipse. Here It will display Server Configuration.
第 1 步:双击 Eclipse 中列出的服务器。这里将显示服务器配置。
Step 2 :Just change the port Number like from 8080 to 8085.
第 2 步:只需将端口号从 8080 更改为 8085。
Step 3 :Save the changes.
第 3 步:保存更改。
Step 4 :re-start your server.
第 4 步:重新启动您的服务器。
The server will start .Hope it'll help you.
服务器将启动。希望它会帮助你。
回答by user2053311
The solution to this issue is:
这个问题的解决方法是:
Step 1:Stop Tomcat(By service or by .bat/.sh what ever the case may be ).
第 1 步:停止 Tomcat(通过服务或通过 .bat/.sh 无论如何)。
Step 2:Delete the already configured Apache Tomcat on eclipse.
第二步:删除eclipse上已经配置好的Apache Tomcat。
Step 3:Now reconfigure the apache on the eclipse and start the server using UI as provided by eclipse.
第 3 步:现在在 eclipse 上重新配置 apache 并使用 eclipse 提供的 UI 启动服务器。
I have the same issue and it has worked.
我有同样的问题,它已经奏效。