Server tomcat v8.0 Server at localhot was unable to start within 45 secods
Asked Answered
L

3

0

I'm using STS tools and Framework Hibernate + Spring to build web application. I got error on the screen (Server tomcat v8.0 Server at localhot was unable to start within 45 secods) when build using apache.

I'have increase the limit into max 145 second, but didn't work and change configuration apache based on internet finding but still not working.

Need advice.

Thanks.

Licence answered 25/8, 2014 at 2:52 Comment(6)
there is no max timeout for this configurationEnergetics
try increasing value or figureout where does it spend time in startup and try to make those operation lazilyEnergetics
now I'm trying to increase 300 seconds..Licence
After increasing time what is the error i have got ?Unschooled
do you see anything in the console output from starting tomcat?Durante
I got same problem (at debugging time), I have breakpoint having horizontal arrow on it, then I removed it and also all breakpoints then after I debugged its works for me.Gaut
C
2

I faced this issue today. I started my Hibernate Web App with the option Run On Server.

Logs:

INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge0waa6y005ie1a2a65t|3bfc6a5e, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.cj.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge0waa6y005ie1a2a65t|3bfc6a5e, idleConnectionTestPeriod -> 0, initialPoolSize -> 5, jdbcUrl -> jdbc:mysql://localhost:3306/web_customer_tracker?useSSL=false&serverTimezone=UTC, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 30000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]

It was trying to connect to local MySql instance but the MySql service was stopped.

I started the MySql Service manually, retried starting the server and it worked.

Try checking all your project's dependencies are up and running.

I know its too late for you, maybe someone else will find it useful.

Thanks

Cloris answered 17/11, 2019 at 18:15 Comment(0)
N
1

This is bit late. But I faced the same problem when running tomcat 8 in Eclipse. In case my case it was due to a system wide proxy and the network settings in Eclipse had been changed. I fixed it by,

Eclipse preferences -> General -> Network Connections and setting the Active Provider to Manual.

Noblesse answered 24/3, 2015 at 17:54 Comment(0)
S
0

This might be the late answer but I just fixed it as below:

I am using Tomcat v9.0 and MySQL server. While starting my Spring MVC web app, I faced the same issue.

Last few lines from the log:


Jul 18, 2020 10:57:08 AM com.mchange.v2.c3p0.C3P0Registry INFO: Initializing c3p0-0.9.5.3 [built 27-January-2019 00:11:37 -0800; debug? true; trace: 10] Jul 18, 2020 10:57:09 AM org.hibernate.Version logVersion INFO: HHH000412: Hibernate ORM core version 5.4.18.Final Jul 18, 2020 10:57:10 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final} Jul 18, 2020 10:57:11 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1b619k3abqqte4y1lsnrqw|4016ccc1, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.cj.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1b619k3abqqte4y1lsnrqw|4016ccc1, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/web_customer_tracker?useSSL=false&serverTimezone=UTC, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 30000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=, password=}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ] Jul 18, 2020 10:57:11 AM com.mchange.v2.resourcepool.BasicResourcePool WARNING: Bad pool size config, start 3 < min 5. Using 5 as start.


I tried to increase the server timeout in the tomcat configuration editor. That did not help. I searched over the Internet nothing helped. Then I launched the MySQL Workbench and whoa! I found the culprit. It said, "Unable to connect to localhost:3306". Then I realized that MySQL service may not be running. I started the MySQL service "MySQL80" and then the tomcat started within 45 seconds.

Hope this may help future readers :)

Spotted answered 18/7, 2020 at 5:41 Comment(1)
You might want to fix your c3p0 config; max sure your initialPoolSize is between your minPoolSize and maxPoolSize .Cadmar

© 2022 - 2024 — McMap. All rights reserved.