I am trying to run Tomcat through Eclipse. This is something that I have done for the past several years. It was working yesterday and now it is not. The error I get is
A Java update caused the same problem (among others) for me. The update caused Eclipse to use ipv6 when pinging Tomcat and for some reason that doesn't work with my setup.
I fixed it by adding
-Djava.net.preferIPv4Stack=true
To eclipse.ini
.
EDIT:
Make sure your hostname is "localhost", or if you are using a specific IP address, make sure its the CORRECT IP address that your computer has.
I changed my host name from "localhost" to my specific IP address (at the time). This was to solve an issue I encountered while doing mobile app development.
My problem was that my IP address changed. So updated my hostname to my new IP address. (I will revert it to localhost once I'm done with mobile testing).
Just a heads up, sometimes its a simple fix.
This is a very old post yet no one of these solutions worked for me. I had to do a combination of answers in this post and others to get it working. This is what I did;
127.0.0.1 localhost
to the host file-Djava.net.preferIPv4Stack=true
to eclipse.ini fileWindow > Preferences > General > Network Connections
Servers (view) > Overview (pane)
to computer's network IP.Server (view) > Module (pane) > Module (list item) > Edit (action button)
References
- Eclipse unable to detect that a server has started
- Tomcat Not Starting Through Eclipse (Timeout)
- Tomcat Not Starting Through Eclipse (Timeout)
I solve this trouble adding
127.0.0.1 localhost
to hosts localdns file (C:\Windows\System32\drivers\etc\hosts), seems that this problem is due to a ipv6 on localhost name.
To understand if this is the problem try to ping localhost and see if it is solved ad ipv4 or ipv6.
Ran into same issue here. Tried out all these solutions the others proposed, none of it works for me.
Finally I realized all this happens since I put the tomcat native library in. I removed it and reverted all the changes above, it works now. Anyway, thanks for all your helps which help me connect the issue with the native library.
I had a similar problem on my system (Windows 7 pro 64 bit), with Tomcat not starting from any Eclipse version. It turns out that by default Eclipse uses the system network configuration, and if you have configured a proxy that does not resolves localhost the Tomcat startup will hang in Eclipse !
To see if you have this problem go to Window -> Preferences -> General -> Network Connections
and see if one of the boxes is checked. I was able to override my proxy configuration by setting Active Provider to Direct
(it unchecks all boxes).