eclipse sts cannot start tomcat: ports already in use

17,002

Solution 1

Kill "java.exe" process from TaskManager in Windows

Solution 2

I have the same problem as yours.

To solve this problem, open Internal Web Browser inside eclipse / STS, then open

http//localhost:8080/yourproject/

then try to running tomcat again. Now tomcat should be running.

Looks like very funny eh, but it works on me. This might be bugs on eclipse / STS. I found this problem only on windows, and so far never happen on my linux.

Share:
17,002
Vyacheslav
Author by

Vyacheslav

Updated on June 28, 2022

Comments

  • Vyacheslav
    Vyacheslav almost 2 years

    Tested eclipse indigo, STS 2.5.2, STS 2.8.0, STS 2.8.5. Tomcat 6, Tomcat 7.

    Tomcat startup hangs at 23%(displayed at right bottom side of eclipse windows/screen). This magic number is always the same. After about 20 seconds at hanged state error occurs. Error info is "ports are already in use".

    There is no Tomcat already started in system. No ports with specified numbers appear in netstat.

    Changing port numbers does not help anything.

    Changing/reinstalling eclipse,STS,tomcat, downloading fresh tomcat zip changes nothing. Deleting workspace and C:/Project/.metadata and stuff - all directories used by fresh install of STS, so deleting them does not help too.

    And interesting history aspect: i've used STS 2.8.2 for 2 weeks before this error occured. Reinstall won't fix anything. After that i was able to use STS 2.5.2 for a month. And the same error occured for 2.8.2. But i delete all its files and reinstall again does not fix anything.

    Reboot does not help.

    Have no any other working with tomcat version of eclipse/STS.

    Any help is appreciated.

    Also please add tag for http://www.springsource.com/developer/sts

    my os is windows 7. In Virtualbox XP everything is fine. And other Windows 7 guys say it works too on their PCs.