Tomcat Server在localhost上需要的几个端口(8005,8080,8009)已经在使用 [英] Several ports (8005, 8080, 8009) required by Tomcat Server at localhost are already in use

查看:752
本文介绍了Tomcat Server在localhost上需要的几个端口(8005,8080,8009)已经在使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Eclipse中的Tomcat上运行一个简单的JSP程序时,我收到以下错误。


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


这是如何引起的,如何我可以解决它吗?

解决方案

您还有另一个Tomcat实例已经运行。您可以通过转到web浏览器中的 http:// localhost:8080 来确认,并检查您是否获得Tomcat默认主页或Tomcat特定的404错误页面。两者都是同样有效的证据,Tomcat运行良好;如果没有,那么你会得到一个浏览器特定的HTTP连接超时错误消息。



你需要关闭它。转到Tomcat安装文件夹的 / bin 子文件夹,然后执行 shutdown.bat (Windows)或 shutdown.sh (Unix)脚本。如果无效,关闭Eclipse,然后打开任务管理器,并杀死所有 java 和/或 javaw 进程。



或者,由于某些原因(这意味着用于生产,并且在开发中无益)时,实际将其安装为Windows服务,则打开服务管理器(开始>运行> services.msc )并停止Tomcat服务。如有必要,完全卸载Windows服务。对于开发,只需ZIP文件即可。



或者如果您的实际意图是同时运行两个Tomcat实例,那么您必须配置第二个实例来监听不同的端口。有关详细信息,请参阅Tomcat文档。


I'm getting the following error when I try to run a simple JSP program on Tomcat in Eclipse.

Several ports (8005, 8080, 8009) 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).

How is this caused and how can I solve it?

解决方案

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.

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. If in vain, close Eclipse and then open the task manager and kill all java and/or javaw processes.

Or if you actually installed it as a Windows service for some reason (this is namely intented for production and is unhelpful when you're just developing), open the services manager (Start > Run > services.msc) and stop the Tomcat service. If necessary, uninstall the Windows service altogether. For development, just the ZIP file is sufficient.

Or if your actual intent is to run two instances of Tomcat simultaneously, then you have to configure the second instance to listen on different ports. Consult the Tomcat documentation for more detail.

这篇关于Tomcat Server在localhost上需要的几个端口(8005,8080,8009)已经在使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆