问题
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.
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/25478405/server-tomcat-v8-0-server-at-localhot-was-unable-to-start-within-45-secods