Reputation: 3244
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.
Upvotes: 3
Views: 17657
Reputation: 11
1> open task manager and end the process javaw.exe if it not work then 2>create a new file application.properties under resources and this -server.port = 8081
Upvotes: 0
Reputation: 1
Goto task manager---->details----->search for javaw.exe and select it(you can search bt typing 'j' in details)---->finally tap on end button. ----restart tomcat,it will work. or
kill the javaw.exe from Taskmanager
Upvotes: 0
Reputation: 37
I had the same problem on Linux.
Upvotes: 0
Reputation: 123
1)Kill javaw.exe
process from TaskManager in Windows
2)restart eclipse
Upvotes: -1
Reputation: 1173
if you are on linux
netstat -nab | grep :8080
we have simlar command on windows i guess you use find instead of grep.
this will help you find the process id blocking port 8080
Also try telnet 8080 to get an idea
sometimes windows firewall also blocks ports - make sure firewall has an exception for this port.
Upvotes: 0
Reputation: 11
The above solutions didnt work for me. Open command prompt -> navigate to tomcat bin folder -> kill tomcat instance (shutdown.bat)
And then start the tomcat from eclipse. It worked just fine for me
Upvotes: 0
Reputation: 29
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.
Upvotes: 2
Reputation: 78
This isn't a great answer, but it got me up and running on my local machine. I had the same results, except for the port error you indicated. Mine would just say "Server failed to start in 45 seconds" with no other explanation. I could adjust the server start time, but that would only delay the inevitable. I had been using tomcat in /opt/dev. I downloaded Tomcat 7.0.26 and installed it into my home directory. I started STS and removed all of my tomcat 7 runtimes. Then I added a new server runtime:
I then did a sample server start from within eclipse with no projects added and it started up fine. I don't know what happened, but this seems to have fixed the problem. I then added my projects and things started up just fine.
Upvotes: 0