You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Cheung <fu...@yahoo.com.INVALID> on 2015/06/19 04:22:40 UTC

回覆︰ Tomcat 8 webapp failed to start on Windows reboot

Hi Chris, 

> 
> 
> 
>Christopher Schultz <ch...@christopherschultz.net> 於 2015年06月19日 (週五) 3:16 AM 寫道﹕ 
>-----BEGIN PGP SIGNED MESSAGE----- 
>Hash: SHA256 
> 
>James, 
> 
>On 6/18/15 4:56 AM, James Cheung wrote: 
>> Environment 
>> 
>> ----------- Tomcat 8.0.21 x64 bit, JDK 8u31, Windows 2008 R2 x64 
>> bit 
>> 
>> 
>> Problem ------- After upgrading from tomcat 7.0.42 to 8.0.21, my 
>> webapp(gih-ws) failed to startup every time the machine is 
>> rebooted. In the tomcat catalina log, it did not show any error, 
>> but in my webapp(gih-ws) access log, it showed below error. 
>> 
>> 
>> ERROR 08 6月 2015 03:20:39,329 (AxisEngine.java:219) -[]- The 
>> service cannot be found for the endpoint reference (EPR) 
>> /gih-ws/services/GIH3Service/keywordSearchWithIndex?maxNoOfResult=11&k 
>eyword=North%20Point%20Government%20Offices&startIndex=0&response=applic 
>ation%2Fjson&lang=en&extent=839266.674348%2C816651.312098%2C839765.32565 
>2%2C817436.687902 
>>  org.apache.axis2.AxisFault: The service cannot be found for the 
>> endpoint reference (EPR) 
>> /gih-ws/services/GIH3Service/keywordSearchWithIndex?maxNoOfResult=11&k 
>eyword=North%20Point%20Government%20Offices&startIndex=0&response=applic 
>ation%2Fjson&lang=en&extent=839266.674348%2C816651.312098%2C839765.32565 
>2%2C817436.687902 
>>  at 
>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhas 
>e.java:78) 
>> 
>This looks like you are trying to call a web service that does not 
>exist. Is the gih-ws service failing to start because it can't access 
>a remote web service, or is the local Axis service logging that the 
>gih-ws service hasn't been deployed? 
> 

We didn't make change to the web servcie. They worked fine before our upgrade. 

>> at org.apache.axis2.engine.Phase.invoke(Phase.java:329) at 
>> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262) at 
>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168) at 
>> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUti 
>l.java:144) 
>>  at 
>> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUt 
>il.java:139) 
>>  at 
>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proce 
>ssURLRequest(AxisServlet.java:837) 
>>  at 
>> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273 
>) 
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at 
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli 
>cationFilterChain.java:291) 
>>  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi 
>lterChain.java:206) 
>>  at 
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
>>  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli 
>cationFilterChain.java:239) 
>>  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi 
>lterChain.java:206) 
>>  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa 
>lve.java:219) 
>>  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa 
>lve.java:106) 
>>  at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat 
>orBase.java:502) 
>>  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja 
>va:142) 
>>  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja 
>va:79) 
>>  at 
>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAcces 
>sLogValve.java:610) 
>>  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv 
>e.java:88) 
>>  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java 
>:518) 
>>  at 
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp1 
>1Processor.java:1091) 
>>  at 
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(A 
>bstractProtocol.java:668) 
>>  at 
>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.pro 
>cess(Http11AprProtocol.java:283) 
>>  at 
>> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoi 
>nt.java:2463) 
>>  at 
>> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint 
>.java:2452) 
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j 
>ava:1142) 
>>  at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor. 
>java:617) 
>>  at 
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThr 
>ead.java:61) 
>>  at java.lang.Thread.run(Thread.java:745) 
>> 
>> 
>> Our finding ----------- We stopped the tomcat 8 service and then 
>> started it again and the webapp(gih-ws) can startup and there was 
>> no error in the gih-ws access log. It is so weird. Is there any 
>> tomcat 8 service startup issue every time the machine is rebooted? 
>> Should we start the Tomcat 8 service in "Startup(Delayed)" mode? I 
>> also include below tomcat catalina log for your reference. Thanks. 
>> 
>> 
>> Tomcat catalina log ------------------- 
>> 
>> 10-Jun-2015 10:04:20.250 INFO [Thread-25] 
>> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
>> ["http-apr-9090"] 10-Jun-2015 10:04:20.313 INFO [Thread-25] 
>> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
>> ["http-bio-9443"] 10-Jun-2015 10:04:20.375 INFO [Thread-25] 
>> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
>> ["ajp-apr-8009"] 10-Jun-2015 10:04:20.437 INFO [Thread-25] 
>> org.apache.catalina.core.StandardService.stopInternal Stopping 
>> service Catalina 10-Jun-2015 10:04:20.500 WARNING 
>> [localhost-startStop-2] 
>> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc 
>> The web application [gih-ws] registered the JDBC driver 
>> [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister 
>> it when the web application was stopped. To prevent a memory leak, 
>> the JDBC Driver has been forcibly unregistered. 10-Jun-2015 
>> 10:04:20.500 WARNING [localhost-startStop-2] 
>> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc 
>> The web application [gih-ws] registered the JDBC driver 
>> [oracle.jdbc.driver.OracleDriver] but failed to unregister it when 
>> the web application was stopped. To prevent a memory leak, the JDBC 
>> Driver has been forcibly unregistered. 10-Jun-2015 10:04:20.500 
>> WARNING [localhost-startStop-2] 
>> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThread 
>s 
>> The web application [gih-ws] appears to have started a thread named 
>> [Thread-9] but has failed to stop it. This is very likely to create 
>> a memory leak. Stack trace of thread: java.lang.Thread.sleep(Native 
>> Method) 
> 
>This certainly seems like an orderly shutdown of Tomcat and associated 
>web services, including the web application you said wasn't running: 
> 
> 
> 
>gih-ws. 
> 
> 
>Can you completely stop Tomcat, delete all the logs, then reboot the 
>machine and post the whole log file? 
> 

We found that the problem occurred every time the machine was rebooted. 
Do you mean the tomcat service and webapps were not shutdown properly during my machine reboot? Any reason you said that? 
As I know, during shutdown, the timeout value is not set by default, does it help to increase the value, say to 60 seconds to allow proper shutdown? 

I once tried to delete the D:\tomcat\work\Catalina\localhost folder and then start tomcat, the problem was gone. 
However I lately found that even I don't delete the work folder, I just stopped the tomcat service and then started it up, the problem was gone also. 

I am wondering whether it relates to the Windows startup rather than the shutdown itself, maybe the web service(gih-ws) was not deployed successfully during Tomcat service startup in machine startup. I am thinking changing the tomcat 8 servcie startup mode from "automatic" to "automatic(startup delayed)". What do you think about that? 

>- -chris 
>-----BEGIN PGP SIGNATURE----- 
>Comment: GPGTools - http://gpgtools.org 
> 
>iQIcBAEBCAAGBQJVgxjUAAoJEBzwKT+lPKRYa6QQAKXDghBf8MVMYsJzaK4xGC27 
>ft6hZdJ0n82cUFzhJ3usyMvG8JhlBf00mfIJuOXYu+F96NAsTb+T1ZGGkm3CTiys 
>2ASisXmyrwz/pXYvtpGR/ftULEPz0Kl6QAAHTwB8HKiLO2cdJw7NadSM1gi09I+/ 
>BwVIUuhn2owI9BC22w9HALSo0tJI+LW35OSKwZ51dOWPOUaP5VVJcGbUrlZtV9DJ 
>0zcfeNsntLHD/47KnYcFUVpSkscEu9SPWHPPa3/GDXQ+wwwsUwBVLBz5eV81dToH 
>VTr/9CwaEwBLH+W7uZolY6aOnJmwaw249pXvfRFmD6yOmRSGb1osMZZnoY/+LSLz 
>VYqaZHS7O6NsAApxKZXvTcLdWA/minqKIxgDU6bYzNYYIcnYcsexOon8Gzs7iZyt 
>S7Zwdxf/zFAIR7LCuBwi+JHFFmCZh2zveChgyG72YBE+4XBEwJHDrfCduS4GuEIP 
>/QygipdX1aouJebIIWzWfjFx8ePVO+TtzoI0C05GZ8j9EhkeNqxzRJXDip9T52k0 
>qFVhaxG0G5B8WmSF1vXUDr7s2esfKK9hKxdrpNQN7KSyiOtOzhUWtQ2Nc3T9Aq// 
>F6SLWT1zHF45DR+YKzlKPFheAVP3Rp0IJWdX2xLK+8KF38s1gYAmFJJW64im1WN6 
>HCPydinmH+FqPY83VEst 
>=4mxb 
>-----END PGP SIGNATURE----- 
> 
>--------------------------------------------------------------------- 
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org 
>For additional commands, e-mail: users-help@tomcat.apache.org 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org