已经使用的端口8080的错误。

时间:2022-12-07 18:14:13

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生成我的第一个web站点,并与Eclipse Galileo运行在Ubuntu 9.10上。因为我生成了我的第一行代码,所以我没有看到网络。当我试图运行程序时,我得到了以下错误:

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).

在localhost中,Tomcat v6.0服务器所要求的几个端口(80808080)已经在使用中。服务器可能已经在另一个进程中运行,或者系统进程可能正在使用端口。要启动此服务器,您需要停止其他进程或更改端口号。

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.

非常感谢。

7 个解决方案

#1


6  

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。

#2


30  

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中单击servers选项卡,然后双击在那里列出的服务器。在打开的配置页面中选择port选项卡。将端口更改为其他端口。重新启动服务器。

#3


10  

on Mac, how I usually solve it

在Mac上,我通常是如何解决它的。

  1. open terminal and cd to downloaded-apache-files-folder/bin (i.e to the folder where shutdown.sh file is located)
  2. 打开终端和cd到下载-apache-files-folder/bin (i)。e转到关机的文件夹。sh文件位于)
  3. enter "sh shutdown.sh" as a terminal command
  4. 输入“sh关闭。作为终端命令。
  5. restart Tomcat/Eclipse..tada!
  6. 重启Tomcat / Eclipse . .大作。

Hope this helps OP or someone else reading

希望这能帮助OP或其他人阅读。

#4


2  

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内部运行,您应该能够从“服务器”视图(窗口->显示视图->服务器)更改端口。

#5


1  

You've another instance of Tomcat already running. You can confirm this by going to http://localhost:8080 in 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实例。您可以通过在webbrowser中访问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子文件夹并执行关闭。蝙蝠(Windows)或关闭。sh脚本(Unix)。

check this answer for more information.

请查看此答案以获得更多信息。

#6


1  

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/关机中。

  1. 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
  2. 我的问题是,超过1个java实例正在运行,我正在改变端口,而不是向后看,所以它继续运行其他的java进程,和那个特定的端口。对于windows用户,:ALT+Shift+Esc,以及你没有使用的结束java进程,现在你应该能够重新使用你的端口8080。

#7


0  

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/)。这是什么情况?

Step 2: Delete the already configured Apache Tomcat on eclipse.

步骤2:删除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.

我也有同样的问题,而且已经奏效了。

#1


6  

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。

#2


30  

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中单击servers选项卡,然后双击在那里列出的服务器。在打开的配置页面中选择port选项卡。将端口更改为其他端口。重新启动服务器。

#3


10  

on Mac, how I usually solve it

在Mac上,我通常是如何解决它的。

  1. open terminal and cd to downloaded-apache-files-folder/bin (i.e to the folder where shutdown.sh file is located)
  2. 打开终端和cd到下载-apache-files-folder/bin (i)。e转到关机的文件夹。sh文件位于)
  3. enter "sh shutdown.sh" as a terminal command
  4. 输入“sh关闭。作为终端命令。
  5. restart Tomcat/Eclipse..tada!
  6. 重启Tomcat / Eclipse . .大作。

Hope this helps OP or someone else reading

希望这能帮助OP或其他人阅读。

#4


2  

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内部运行,您应该能够从“服务器”视图(窗口->显示视图->服务器)更改端口。

#5


1  

You've another instance of Tomcat already running. You can confirm this by going to http://localhost:8080 in 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实例。您可以通过在webbrowser中访问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子文件夹并执行关闭。蝙蝠(Windows)或关闭。sh脚本(Unix)。

check this answer for more information.

请查看此答案以获得更多信息。

#6


1  

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/关机中。

  1. 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
  2. 我的问题是,超过1个java实例正在运行,我正在改变端口,而不是向后看,所以它继续运行其他的java进程,和那个特定的端口。对于windows用户,:ALT+Shift+Esc,以及你没有使用的结束java进程,现在你应该能够重新使用你的端口8080。

#7


0  

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/)。这是什么情况?

Step 2: Delete the already configured Apache Tomcat on eclipse.

步骤2:删除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.

我也有同样的问题,而且已经奏效了。