Tomcat Server not starting with in 45 seconds
Asked Answered
E

33

74

Server Tomcat v7.0 Server at localhost was unable to start within 101 seconds. If the server requires more time, try increasing the timeout in the server editor.

This is my error. I changed time from 45 secs to 101 secs, but the problem remains. I removed eclipse and tomcat and I re-installed again but the same problem occurs; how can I fix this?

Entomophagous answered 19/3, 2013 at 11:49 Comment(1)
see this commentHulk
M
129

Try remove all breakpoints.Also you can increase start up time.

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

enter image description here

Mesial answered 7/10, 2013 at 13:18 Comment(7)
even if i increase the start time, it show the same error. what should i do next?Goeger
I don't know why, but removing all breakpoints worked for me too!Rookie
INFO: Server startup in 107734 ms. If still having issues check logs ...\Program Files (x86)\Apache\apache-tomcat-7.0.26\logsSloven
where,... what is this 'Servers view' ?Locklear
@OliverWatkins Where your 'Console' is shown in Eclipse, there should be a tab called 'Servers'. If you can't see it, on the Eclipse menu-bar (at the top), open Window -> Show View -> Servers. This should bring up the Servers view.Farandole
@AdrianoResende - there is "breakpoints" view debug perspective, (if not, go to windows->show view->breakpoints); click "Remove all breakpoints"(2 overlapping multiply signs) OR better click "Skip all breakpoints" (small ball with \ on it).Selfoperating
Removing breakpoints worked for me. Thanks for the answer.Spiteful
G
41

I got the solution for your requirement.

I'm also getting the same error in my eclipse Luna.

Go to Window -> Preferences.

Then General -> Network Connections.

Then select the Active Provider as Manual.

Then restart the tomcat and run. It will work.

Hope it will help you.

Goeger answered 3/11, 2014 at 8:27 Comment(2)
worked for me. Can you explain what is going on here?Lynnelynnea
Holy Cow! I feel like I just got part of my life back!Illuviation
S
22

Open servers view, open Timeouts and set up Start

add start

Sesquicarbonate answered 25/2, 2017 at 12:4 Comment(1)
much better answerAntimonous
R
11

Open the Servers view -> double click tomcat -> drop down the Timeouts section you can increase the startup time for each particular server. like 45 to 450

Roye answered 31/1, 2017 at 11:48 Comment(0)
H
9

I know it's a bit late, but I've tried everything above and nothing worked. The real problem was that I'm using hibernate, so it was trying to connect to mysql but was not able, thats why it showed time out.

Just to let u guys know, I'm using RDS(Amazon), so just to make a test I changed to my local mysql and it worked perfectly.

Hope that this answer helps somebody.

Thanks.

Helluva answered 14/9, 2016 at 1:0 Comment(0)
C
9

In my case I was using spring+hibernate and forgot to run my MYSQL server due to which hibernate was not getting loaded and thus was throwing error

Comfy answered 14/5, 2017 at 6:42 Comment(1)
It really worked in my case. Actually, I also had the same problem. My application was not able to connect with MySQL. And, it is connected and working fine. Thanks for your answerIover
A
6

Just go with below points. Open Eclipse Windows -> show View -> server -> double click tomcat/press Fn + F3 -> Timeouts -> increase start time Save setting and Restart eclipse also delete .metadata folder from work space if you don't need Check Now... All The Best

Adhere answered 19/8, 2017 at 9:50 Comment(1)
Oh, wow. I had expected right clicking and selecting "Properties" would give me the server properties. Never expected I'd get something different when double-clicking it.Piperine
S
5

Disabling my antivirus does the trick for me ...

Stevestevedore answered 8/1, 2014 at 23:47 Comment(0)
B
5

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 a comment on a related issue and realized that I had 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 as it usually did.

Ballarat answered 19/2, 2014 at 19:58 Comment(0)
S
4

Folks, I had this same problem and tried raising the timeout, deleting the server and creating again and did not work. I was running Eclipse Kepler in Linux. The solution proposed by @Phoenix is what worked for me:

Window -> Preferences -> General -> Network Connections

Set Active Providers in manual and then configure or not the proxy. I had this option in "Native".

Then I realized I had the variable http_proxy set. It was set in the ~/.bashrc file. This environment variable is the culprit of many problems.

Once I set http_proxy to empty

export http_proxy=

to check it:

echo $http_proxy

I was able to leave option "Active Provider" in "Native" and solve the timeout problem. This is useful because Eclipse adopts the native configuration, in case you change it often.

In my case, where I had configured http_proxy in ~./bashrc, I had to close Eclipse and even log out and log in again.

Skylar answered 18/8, 2015 at 1:3 Comment(0)
H
4

Below worked for me.

Removed all Breakpoints. Then did a clean on server as below.

Right click on server-->Click clean.

Houstonhoustonia answered 19/4, 2017 at 18:23 Comment(0)
K
3

I had tried increasing the Server Start up time for tomcat server, removed server and created new server, removed server and changed run-time environment configurations. Those thing didn't work for me. At last, i found deployment descriptor(url pattern of servlet-mapping) is the one that making the trouble.

Klehm answered 10/2, 2014 at 6:59 Comment(0)
N
3

Just remove or delete the server from eclipse and reconfigure it or add it again to Eclipse.

Noctilucent answered 4/6, 2015 at 9:56 Comment(0)
C
2

I had the same problem I deleted the server from the server tab, and also the server folder under your eclipse workspace, restarted eclipse, set up a new server, and it appears to be running OK now.

Chilly answered 14/4, 2014 at 14:1 Comment(0)
R
2

Just for knowledge.. Also had the same issue and solved it stopping and starting again the mysql service... I think that was some conflict between mysql-service and tomcat.

Good Luck

Residual answered 2/7, 2014 at 10:33 Comment(0)
U
2

In my case tomcat was configured to start not on localhost(guess it came from servers.xml connector entry) so Eclipse fails to find it running after start. Changed Host name on Servers tab to my 192.168.xxx.yyy ip.

Had the same error message, though tomcat did start sucessfully, but then Eclipse shuts it down.

Unjust answered 28/3, 2016 at 6:1 Comment(0)
P
2

If some one had the same issue like me about the timeout of the server where you can found it. This response can help you.

Click on window > Show View > Server. When you are on the server, you will see the server that you have configured before. After that, right click on your server configuration, go to Properties > General and click on Switch Location. After you clicking on "Switch Location", the server configuration will be appear on the Package Explorer of eclipse. Then Double click on the server file in the package explorer you will see where the timeout located.

Thank you.

Petticoat answered 10/8, 2016 at 14:11 Comment(0)
M
2

None of the above worked for me but this - 1. Remove any project if configured already while installing Tomcat. 2. Right click on configured server -> clean and -> Clean tomcat working directory

Did couple of times and the issue resolved. Thanks.

Metro answered 12/1, 2017 at 15:2 Comment(0)
K
2

try clean Tomcat working directory,it works for me

Kyrakyriako answered 10/4, 2020 at 5:7 Comment(1)
It may depend on the configuration or set up. Here's one way of fixing the issues: click on the "Servers" tab at the bottom of Eclipse window, then right click on "Tomcat v9.... of your tomcat version. From the pop up window's list menu, click "Clean". After that, re-run your application and it should work at this time.Monocotyledon
M
1

Well, I tried all the solutions:

  • increasing timeout seconds;
  • deleting the server instance in Eclipse along with the Run Config.

None of them worked.

And:

  • there was no breakpoint in my code;
  • I don't use any antivirus.

I realized that some people - who had the same problem - were using Eclipse Helios (so was I).

I switched to Eclipse Kepler and it worked perfectly.

Maybe it can be a solution. I wanted to use Helios, but Kepler is okay.

Misguide answered 8/10, 2014 at 12:13 Comment(0)
W
1

I was too facing similar issue and here I found another solution for it.

I have just started Eclipse Luna and not developed/deployed any project yet. I tried adding Tomcat v7.0 Server and got same error.

In order to resolve the issue I went to Server Perspective (it's actually server tab next to the console tab located below Project code). Double click on Server which is added to Eclipse. It will open up Overview page. Look for Server Location and select Use workspace metadata(does not modify Tomcat location). Now restart the Server and error will go away.

Server > (double click) Tomcat v7.0 Server at localhost > (Overview page) Server Location > Select -- Use workspace metadata(does not modify Tomcat location).

Wonted answered 3/7, 2016 at 13:23 Comment(0)
D
1

URL pattern of <servlet-mapping>:

Check project explorer → Deployment descriptor → Servlet Mapping → check that all mapping present in controller package. ref. image as below:

shop project ref

if there is any mapping not available, Then remove that <servlet> and <servlet-mapping> tag in web.xml.

Dezhnev answered 3/1, 2018 at 9:50 Comment(0)
P
0

Is your browser making calls to the server while it is starting? if yes, you probably should close it e.g. if your browser is currently set to http://localhost, close it before attempting to start the server.

Phaedra answered 16/7, 2015 at 6:17 Comment(0)
L
0

If you are trying to debug the application on server, just check out the breakpoints. You might had include the whole class as breakpoint. So remove that breakpoint.

This thing worked in my case when i was trying to debug.

Lorielorien answered 3/7, 2016 at 10:18 Comment(0)
P
0

Nothing of the above helped me but setting:

-Djava.net.preferIPv4Stack=true

as VM Argument in the VM Arguments tab of the Tomcat Server Debug Configuration Settings solved the problem. (Tomcat 8, Windows 10, Eclipse Mars)

Phratry answered 26/8, 2016 at 13:58 Comment(0)
B
0

Tomcat Server not starting with in 45 seconds

right click on the configured server go to properties->select monitoring -> Add ->HTTP protocol 8080

after run server it will deploy.

Bandicoot answered 13/9, 2016 at 12:55 Comment(2)
Not sure how, but this fixed. :)Meyer
Yep, combination of this and all other things on this thread work for me as wellFranciscofranciska
S
0

I stoped the tomcat on the computer and started the service (tomcat) using the eclipse IDE.

Showy answered 27/12, 2016 at 14:22 Comment(0)
L
0

If you are running into this on Mac and you installed Tomcat using brew, one good way to get round that is to install Tomcat using a zip file instead.

Go here, download a zip file, unzip it, and in Eclipse, create a new server and specify "Tomcat installation directory" as the unzipped file.

Leanto answered 12/9, 2017 at 3:0 Comment(0)
P
0

Timeouts:

  • Start: 200
  • Stop: 45

..and then Window → Preferences → General → Network Connection.

Set "Active Provider" = Manual (to mark all the checkboxes).

Prussiate answered 29/11, 2017 at 2:55 Comment(0)
A
0

Turns out that MySQL wasn't running in my case. I've started MySQL service, and it worked.

Affront answered 9/8, 2019 at 15:13 Comment(0)
D
0

It's JVM space capacity (heap and Permanent area) issue in my case, it works after add Argument Config for Tomcat Server (Run Configuration, Arguments).

-Xms512m -Xmx1536m -XX:MaxPermSize=512m -Djava.util.Arrays.useLegacyMergeSort=true
Doorpost answered 29/8, 2019 at 0:28 Comment(0)
K
0

If you are using any Databases such as Oracle/Mysql then first check this databases services are start

Kyrakyriako answered 21/4, 2020 at 9:42 Comment(0)
C
-1

You need to check if your spring context have this statement

<property name="MaxTotal" value="30"></property>

If your project has more than 7 DAOs won't work, because it won't create 8 connections.

my project:

<bean id="mysqlDataSource" class="org.apache.commons.dbcp2.BasicDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
    <property name="url" value="jdbc:mysql://localhost/(name of your schema)"></property>
    <property name="username" value="root"></property>
    <property name="password" value="root"></property>
    <property name="MaxTotal" value="(numbers of DAO)"></property>
</bean>
Corbicula answered 2/10, 2016 at 0:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.