Tomcat 7 times out during start up

做~自己de王妃 提交于 2021-02-08 09:47:09

问题


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?


回答1:


@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.



来源:https://stackoverflow.com/questions/11194108/tomcat-7-times-out-during-start-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!