1

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?

Community
  • 1
  • 1
skytreader
  • 11,467
  • 7
  • 43
  • 61
  • Did you ever resolve this? I have it now in multiple workspaces, projects, tomcat runtimes... Nothing helps! I've tried eclipse.exe -clean, reboot, different JDK's... – Domenic D. Aug 29 '12 at 16:05
  • @DomenicD., unfortunately no. Have you tried the hit-and-miss solution I mentioned? How did you arrive by that process? Truth is, that solution was just mentioned to me by a superior. I've been looking everywhere for a mention of it---maybe it'd have more info on the problem---but I can't find it. And I left that job without getting to ask my superior where. So... :C – skytreader Aug 29 '12 at 16:35
  • yes, but to no avail. As a side note, it doesn't appear to be Eclipse either. I re-installed it from an old backup of the /eclipse folder (that worked at the time) and still have the same issues. – Domenic D. Aug 31 '12 at 12:39

1 Answers1

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.

Domenic D.
  • 5,276
  • 4
  • 30
  • 41
  • Good for you! I can't verify if this is also the problem in my set-up because, as I said, I already left that job. So, 'till other people complain and prove that your trick does not work, yours is the honor of the best answer ;D. – skytreader Sep 12 '12 at 16:42