127

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.

Dejell
  • 13,947
  • 40
  • 146
  • 229

10 Answers10

275

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

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

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
  • 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 Jul 30 '15 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

Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
  • 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 Dec 26 '16 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.

  • This was also my issue too. I was using Java 1.7 and when I switched to 1.6, it worked. – Xonatron Nov 02 '12 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 http://askubuntu.com/questions/141791/is-there-a-way-to-update-all-java-related-alternatives – Bartosz Firyn Jan 18 '13 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

Med Elgarnaoui
  • 1,612
  • 1
  • 18
  • 35
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.

Rohitdev
  • 866
  • 6
  • 15
  • 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 May 17 '17 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.

1

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/

Jonathan Holloway
  • 62,090
  • 32
  • 125
  • 150
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.

Ribo
  • 3,363
  • 1
  • 29
  • 35
  • this by the way is extremely helpful to know when trying to configure the tomcat for the maven-tomcat-plugin. – omilke Jun 12 '13 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.

ImaJedi4ever
  • 3,291
  • 1
  • 18
  • 11
-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.