129

When I try to run my Tomcat I get a 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.

Where is this server editor? I didn't find it in windows preference server.

I am using Eclipse 3.6.

0

10 Answers 10

278

Open the Servers view -> double click tomcat -> drop down the Timeouts section

There you can increase the startup time for each particular server.

1
  • 17
    +1, all these years and I never knew that Server in the Servers tab was clickable and expandable. I was assuming right click had all the options available!
    – Walls
    Commented Jul 30, 2015 at 12:28
67
  1. Go to server View
  2. Double click the server for which you want to change the time limit
  3. On the right hand side you have timeouts dropdown tab. Select that.
  4. You then have option to change the time limits.

enter image description here

1
  • 1
    In my case the reason of this error was wrong place for setting of Tomcat port, however I saw correct place for it on your screen ^_^. Thanks
    – Fisk
    Commented Dec 26, 2016 at 15:08
4

SOLVED: That's it!!!! For me was compiling with JDK6 but running Tomcat with JDK7, WST uses the system properties and not the eclipse settings. I also configure the same JDK Version in eclipse and in System (check it with java -version in cmd line)

Details: I try to configure eclipse like describe here, but it didn´t solve the problem, then I notice in eclipse´s error log that tomcat was started with jre 1.7. in spite of my configurations.

I also try, in cmd line, 'java -version' and obtained '1.7' instead of expected '1.6'.

I also decide to configure java 1.6 (like in eclipse) in system panel but it didn´t solve the problem. I also desinstall jre 1.7 restart eclipse AND IT SUCCESS!.. It was a very usefull clue, thank you.

2
  • This was also my issue too. I was using Java 1.7 and when I switched to 1.6, it worked.
    – Xonatron
    Commented Nov 2, 2012 at 13:41
  • That was my issue as well. I had Java 1.6 configured in workspace and Java 1.7 in system. Solution for me was to update Java alternatives in accordance to this post askubuntu.com/questions/141791/… Commented Jan 18, 2013 at 14:08
3

Double click on server and see the timeouts section and add more time look at the picture enter image description here

1

The issue is also created if you have setup breakpoints in the code and trying to start tomcat in debug mode post some code overhaul.

Solution is to clear all the breakpoints.

1
  • Alternatively, there could be something in your startup code that is hanging, and if you add breakpoints you can step through to find which line is preventing Tomcat startup from continuing. For me it was something to do with jaas config.
    – Noumenon
    Commented May 17, 2017 at 16:04
1

double click tomcat , see configure setting with "timeout" modify the number. Maybe this not the tomcat error.U can see the DB connection is achievable.

0

Windows->Preferences->Server

Server Timeout can be specified there.

or another method via the Servers tab here:

http://henneberke.wordpress.com/2009/09/28/fixing-eclipse-tomcat-timeout/

1
  • Windows->Preferences->Server does not have a Server Timeout parameter (Eclipse 4.29.0) Commented Dec 12, 2023 at 9:34
0

This problem can occur if you have altogether too much stuff being started when the server is started -- or if you are in debug mode and stepping through the initialization sequence. In eclipse, changing the start-timeout by 'opening' the tomcat server entry 'Servers view' tab of the Debug Perspective is convenient. In some situations it is useful to know where this setting is 'really' stored.

Tomcat reads this setting from the element in the element in the servers.xml file. This file is stored in the .metatdata/.plugins/org.eclipse.wst.server.core directory of your eclipse workspace, ie:

//.metadata/.plugins/org.eclipse.wst.server.core/servers.xml

There are other juicy configuration files for Eclipse plugins in other directories under .metadata/.plugins as well.

Here's an example of the servers.xml file, which is what is changed when you edit the tomcat server configuration through the Eclipse GUI:

Note the 'start-timeout' property that is set to a good long 1200 seconds above.

1
  • this by the way is extremely helpful to know when trying to configure the tomcat for the maven-tomcat-plugin.
    – omilke
    Commented Jun 12, 2013 at 13:09
0

I also had the issue of the Eclipse Tomcat Server timing out and tried every suggestion including:

  • increasing timeout seconds
  • deleting various .metadata files in workspace directory
  • deleting the server instance in Eclipse along with the Run Config

Nothing worked until I read Rohitdev's comment and realized that I had, in fact added a breakpoint in an interceptor class after a big code change and had forgotten to toggle it off. I removed it and all other breakpoints and Tomcat started right up.

-1

I have tomcat 8 Update 25 and tomcat 7 but facing the same issue it shows the message Server Tomcat v7.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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.