0

I have the same problem as Tomcat in Eclipse: It runs but time out during startup anyway, as long as I start running an application associated with my Tomcat 5.5 server before the server it started.

But if I run the server by itself from within Eclipse, Eclipse recognizes the startup and doesn't time out. I can then run my associated application from within Eclipse as well, and it starts up normally on the already-started server.

It's a minor inconvenience, but does anyone know what would cause the server startup to be unrecognized when I start it via choosing to run the application, but recognized when I start the server alone?

Community
  • 1
  • 1
Elly
  • 63
  • 8

1 Answers1

0

Some updates of Java cause problems with Eclipse's networking operation. Specifically, Eclipse tries to use IPv6 instead of IPv4 and sometimes fails. When Eclipse starts up Tomcat, one of the final steps that it does is tests the a debug call to Tomcat. This is likely to be the part that is hanging. Fortunately, the fix is very easy. We simply tell Eclipse to use IPv4 instead.

To do this, edit the eclipse.ini file (found in the Eclipse directory) and add the following to the end of the file on its own line:

-Djava.net.preferIPv4Stack=true

Restart Eclipse and you should be good to go.

PeterToTheThird
  • 353
  • 1
  • 2
  • 10