Tomcat unable to start within 45 seconds

解决 Tomcat v7.0 Server at localhost was unable to start within 45 seconds

欲哭无泪的教训,启动了好几次,不知道为什么那么鲜红的几个大字,却没有想办法解决

eclipse 中tomcat启动超时报错如下:

Starting Tomcat v7.0 Server at localhost' has encountered a problem Server Tomcat v7.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.

tomcat启动错误图片如下:

Tomcat unable to start within 45 seconds

出现上述错误是因为eclipse中配置tomcat的 timeouts时间过短,需要把tomcat的启动时间设置的长一些

tomcat启动超时的设置方法如下:

1.在servers中找到如图位置,双击图片标红的位置“tomcat v7.0 server at localhost

2.在tomcat的配置界面左边部分周到 timeout 设置tomcat start的时间 如下图:

Tomcat unable to start within 45 seconds

方法二:

修改 workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。 

把其中的start-timeout="45" 改为  start-timeout="100" 或者更长,根据不同同学的工程大小来设置。最后重启eclipse


今天碰到一个问题,我把连接池的初始连接数设到10,结果在eclipse里启动tomcat的时候出现以下的错误: Server Tomcat v6.0 at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor. 我找遍了eclipse的设置也没找到增加timeout的地方,后来发现秘密在这里: 在servers view里,双击你要设置的server,会打开该server的设置窗口,在右上部有Timeouts的设置部分,设置timeout就在这里了,呵呵,关键是双击哦。