Tomcat在启动过程中超时7次 [英] Tomcat 7 times out during start up

查看:71
本文介绍了Tomcat在启动过程中超时7次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Eclipse Indigo上运行Tomcat 7.Tomcat时不时地在启动时超时.我发现的一个偶然的解决方案是使用相同的服务器名和主机名运行Tomcat.我反复进行此操作,有时它可以工作,有时却不能.我也尝试过在8080、9080和8081之间旋转HTTP端口,但是就我而言,这个问题并不取决于端口.我还确定唯一运行的Tomcat是Eclipse.我检查我的任务管理器.我想知道这里是否有人知道一种更可靠的方法来避免这种情况?

当然,我已经进行了自己的研究,发现了诸如

例如,就在最近,我遇到了Eclipse故障的一种情况,即使在没有错误的情况下,在编辑器中也会将您的语法标记为错误.这次,刷新和关闭相关文件无效.由于我受不了那些锯齿状的线条,因此我采取了极端的措施并重新启动了Eclipse.重新启动后,该文件在编辑器中的确是完美无缺的.但是,Tomcat在启动时超时,令我感到沮丧.

有什么建议吗?

@skytreader-我发现了问题!至少对我来说,我运行本地代理服务器(CNTLM将NTLM凭据传递到内部网站).当您在eclipse中启动tomcat时,在Eclipse中触发启动"模式的是对端口的ping操作,这是尝试与服务器端口(即8080)的连接.显然,在运行本地系统代理时,在eclipse中这样做是有问题的.

我建议您将Eclipse代理设置设置为DIRECT.如果您使用的是Windows,则可以使用proxycfg设置系统代理.

I'm running Tomcat 7 on Eclipse Indigo. Every now and then, Tomcat times out on start-up. A hit-and-miss solution I've found is to run Tomcat with the same server name and host name. I do this repeatedly and sometimes it works, sometimes it doesn't. I've also tried rotating HTTP ports between 8080, 9080, and 8081 but, as far as I'm concerned, this problem does not depend on the port. I'm also sure that the only Tomcat running is Eclipse's; I check my Task Manager. I'm wondering if anyone here knows of a more trusty method to avoid this?

Of course, I've done my own research and found threads like this (the closest one I found to my set-up and symptoms). However, as I've already stated, I've been rotating through ports (I'll note that my rotation often includes the Admin port and the AJP to 8005/9005 and 8009/9009, respectively) but still to no avail.

I've also tried increasing the start-up timeout interval of Tomcat and got as far as 120s before I realized that determining the interval that won't cause a timeout is like some kind of Halting Problem.

And I've also tried cleaning the server, deleting and creating a new one, etc. but it still times out unless I get lucky with the hit-and-miss trick described above.

For instance, just recently, I've had a case of that Eclipse glitch where in the editor marks your syntax wrong even when it isn't. This time, refreshing and close-opening the concerned file didn't work. Since I can't stand those jagged lines, I took to extreme measures and restarted Eclipse. Upon restart, the file is indeed flawless in the editor. But Tomcat times out on start up, to my dismay.

Any suggestions?

解决方案

@skytreader - I figured out the issue! At least for me, I run a local proxy server (CNTLM to pass NTLM credentials to internal websites). When you start tomcat in eclipse what triggers the "started" mode in Eclipse is a ping to the port it is an attempted connection to the server port (i.e. 8080). Apparently there are issues doing that in eclipse when running a local system proxy.

I'd recommend you set your Eclipse proxy settings to DIRECT. If you're using Windows, you can set your system proxy using proxycfg.

这篇关于Tomcat在启动过程中超时7次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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