I occasionally have problems with starting Tomcat from Eclipse. Eclipse WTP gives me the message:
Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
While searching the web I found that others also have the problem hence this blog post.
Via a Eclipse forums post I recently learned how I could analyse the the problem.
Larry Isaacs explains:
The lack of output in the Console view suggests that the attempt to launch Tomcat is failing. After attempting to start Tomcat, switch to the Debug perspective and look in the Debug window. You should see a terminated launch. You can right-click on the nested item under the terminated launch and select Properties. This should display the command line that is being used to launch Tomcat. You could try that command in a terminal window to see what happens.
Eclipse uses javaw so you have to change it to java, as javaw will not open a console or log anything to an existing console (as Larry also explains in the forum post).
I hope this helps to identify the problem. I personally restarted my Laptop and ran Eclipse with -clean and now Tomcat starts again without problems.
When using Tomcat in development mode a good alternative to the WTP startup is to create an embedded tomcat application in the IDE and start it up as a normal Java app.
I think this ‘Tomcat 6.0 Server Unable to Start in 45 seconds’ issue is fixed by Eclipse.
Today, I ran into the same issue. But when I right clicks on Tomcat server on Eclipse’s Server tab, selecting ‘Open’, it opens ‘Tomcat v6.0 Server at localhost’ page at Editor place, taking look at right side ‘Timeouts’ section, it says ‘Specify the time limit to complete server operations.’, default start (in seconds) is ’45′ seconds, you can change to 100 seconds or 10 mins, as you like.
Then this 45 seconds issue is fixed!
@Hai: in my case it was not the problem that the startup time was to small but another problem. Increasing the startup time only helps if the time is not sufficient to start the server.
Hai! u r right, I was facing same issue i changed time out to 100 and its resolved. But regularly cleanup the tomcat work directory and to close unnecessary apps on machine is also helpfull
I had the same problem, except that the server failed to start, period.
It was starting fine one minute and then suddenly began timing out. We have two web apps running on separate servers and one started and the other didn’t.
Eventually I found my Eclipse shortcut ‘Start in’ location pointed to an older version of Eclipse.
When I replaced this with the current location of eclipse.exe it began working again.
Why it worked for the last 8 months and suddenly stopped remains a mystery.
But close the eclipse and reopen it.
I can’t find “Eclipse’s Server Tab”. Please tell me how to find it.
By the way, which version of Eclipse are you using. I am on Galileo.
Thanks,
/Aron
Alright. You are to unfamilair:
Uncheck “Launch in background” and you are done!
Why don’t spell it out?
/Aron