Tomcat几种出错方法

1.  Several ports (8005, 8089, 8009) required by Tomcat v8.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).

原因: 端口8005, 8089, 8009被占用了。可能是在打开Tomcat的情况下关闭了Eclipse,或是Eclipse非正常关闭,导致先前的Tomcat没有被关闭,端口占用。或是其他软件占用了tomcat的端口号。

解决方法:手动将tomcat关闭(双击tomcat目录下bin文件夹中shutdown.bat文件),如果找不到,则打开任务管理器,结束"javaw.exe"这个进程。

 

2.  Server Tomcat v8.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

原因:

一种是项目配置有错误(可能是数据库、Redis之类的配置错误,也可能是相关的服务没有启动,防火墙之类的);

另一种是项目启动的确实比较慢,需要更长的时间,解决方法如下:

如果将时间改的很大了,还是不能启动成功,有以下两种情况:

  1、项目配置有问题,解决方向错了;

  2、tomcat 的 webapps 目录下还有其它的项目,导致服务启动失败了,尝试删除其它项目,再启动调试看看。

 

 3. Server Tomcat v8.0 Server at localhost failed to start.

原因:已经发布到tomcat上的某个项目的servlet过滤器配置错误(这种错误经常是由web.xml未配置正确而引起的)。

解决办法:如在web.xml下,将过滤规则定为“*”就是一种错误,需要更正为“/*”或者其他(但是必须要有“/”开头,表示当前项目)

 

4. Tomcat server configuration at \Servers\Tomcat v8.0 Server at localhost-config is missing. Check the server for errors.

解决办法: 重新再eclipse 中配置tomcat 

Preference——》server——》···

 

5. Could not publish server configuration for Tomcat v8.0 Server at localhost.

Multiple Contexts have a path of "/ssh".

 原因: 在配置文件中存在多个  ssh  的配置,导致不能发布服务。

解决办法:

如果是使用的eclipse tomcat 插件,需要在你的工作空间 找到如下文件:在eclipse的Server文件夹下面找到server.xml;

如果是Tomcat单独服务器就需要找Tomcat的安装目录:${Tomcat_home}\apache-tomcat-8\conf\server.xml

删掉其中一个节点即可。

 

posted @ 2018-11-03 23:30  答辉  阅读(1389)  评论(0编辑  收藏  举报