Apache Tomcat 6.0 Server Unable to Start

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.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, With more than one million visitors per month his website vogella.com is one of the central sources for Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , . Bookmark the permalink.

8 Responses to Apache Tomcat 6.0 Server Unable to Start

  1. Rod says:

    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.

  2. Hai says:

    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!

  3. Lars Vogel says:

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

  4. Abdul says:

    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

  5. Nev says:

    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.

  6. Harivendra says:

    But close the eclipse and reopen it.

  7. Aron says:

    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

  8. Aron says:

    Alright. You are to unfamilair:

    Uncheck “Launch in background” and you are done!
    Why don’t spell it out?

    /Aron

Comments are closed.