Tomcat Not Starting Through Eclipse (Timeout)

后端 未结 27 2374
终归单人心
终归单人心 2020-12-01 06:41

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

相关标签:
27条回答
  • 2020-12-01 07:01

    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.

    0 讨论(0)
  • 2020-12-01 07:02

    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.

    0 讨论(0)
  • 2020-12-01 07:03

    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;

    • Add 127.0.0.1 localhost to the host file
    • Add -Djava.net.preferIPv4Stack=true to eclipse.ini file
    • Set Active Provider to Manual in Window > Preferences > General > Network Connections
    • Change Host name in Servers (view) > Overview (pane) to computer's network IP.
    • Disable auto reloading in 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)
    0 讨论(0)
  • 2020-12-01 07:04

    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.

    0 讨论(0)
  • 2020-12-01 07:05

    Ran into same issue here. Tried out all these solutions the others proposed, none of it works for me.

    1. change http 1.1 port to 8090.
    2. add -Djava.net.preferIPv4Stack=true to eclipse.ini (STS.ini in my case).
    3. in Window -> Preferences -> General -> Network Connections, set Active Provider to Direct or Manual.
    4. add 127.0.0.1 localhost to hosts localdns file (C:\Windows\System32\drivers\etc\hosts)

    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.

    0 讨论(0)
  • 2020-12-01 07:06

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

    0 讨论(0)
提交回复
热议问题