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

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

问题描述

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

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

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

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?

推荐答案

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

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 安装文件夹的 /bin 子文件夹并执行 shutdown.bat (Windows) 或 shutdown.sh (Unix) 脚本.如果无效,请关闭 Eclipse,然后打开任务管理器并杀死所有 java 和/或 javaw 进程.

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.

或者,如果您出于某种原因实际上将其安装为 Windows 服务(即用于生产并且在您刚刚开发时没有帮助),请打开服务管理器(开始 > 运行 > services.msc) 并停止 Tomcat 服务.如有必要,请完全卸载 Windows 服务.对于开发,只需 ZIP 文件即可.

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.

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

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服务器需要的几个端口(8005、8080、8009)已经在使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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