Dear list,
I'm really hoping that someone of you is able to help me with my
problem!
Our system: Debian Lenny, Tomcat 6.0.18, mod_jk, Apache 2.2
With the new version of the web application we're using, we have to
deploy a war-file in tomcat. Everything worked fine at the beginning,
but in the last week we experienced some problems with tomcat because
we got the "Service Temporary Unavailable"-Page every now and then. We
have to restart tomcat every night and I assume that our problem has
something to do with that. The restart is happening with a cron job/
shell script that looks like that:
#!/bin/bash
cd /root
/usr/local/tomcat6/bin/shutdown.sh
/usr/local/tomcat6/bin/startup.sh
In the last week I got a "Service temporary unavailable"-message in
the morning (every 2 days) and when I got such a message, the log
contained this error messages:
Apr 21, 2010 4:35:01 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8081
Apr 21, 2010 4:35:02 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Apr 21, 2010 4:35:31 AM
org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server} Setting property 'debug' to '0'
did not find a matching property.
Apr 21, 2010 4:35:32 AM
org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context}
Setting property 'debug' to '4' did not find a matching property.
Apr 21, 2010 4:35:32 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use<null>:8081
at
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at
org
.apache.catalina.core.StandardService.initialize(StandardService.java:
677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:
795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:
260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
412)
Apr 21, 2010 4:35:32 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed:
java.net.BindException: Address already in use<null>:8081
at
org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at
org
.apache.catalina.core.StandardService.initialize(StandardService.java:
677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:
795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:
260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
412)
Apr 21, 2010 4:35:32 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 312 ms
Apr 21, 2010 4:35:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 21, 2010 4:35:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Apr 21, 2010 4:35:32 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO: validateJarFile(/usr/local/tomcat6/webapps/olat/WEB-INF/lib/
geronimo-spec-servlet-2.4-rc4.jar) - jar not loaded. See Servlet Spec
2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Apr 21, 2010 4:35:41 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Apr 21, 2010 4:35:42 AM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use<null>:8081
at
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at
org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:519)
at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at
org.apache.catalina.connector.Connector.start(Connector.java:1131)
at
org.apache.catalina.core.StandardService.start(StandardService.java:531)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:
578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
413)
Apr 21, 2010 4:35:42 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler
start failed: java.net.BindException: Address already in use<null>:8081
at
org.apache.catalina.connector.Connector.start(Connector.java:1138)
at
org.apache.catalina.core.StandardService.start(StandardService.java:531)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:
578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
413)
Apr 21, 2010 4:35:42 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10131 ms
So, I think the problem is: when shutting down tomcat, the
Http11Protocol is not shut down but Tomcat tries to start it up anyway
so the "SEVERE: Error starting point" comes up with the BindException
that the Address is already in use. So, one of my first ideas was to
put a sleep in between the shutdown.sh and the startup.sh, and it
works when calling the script manually (tried it like a hundred times
on the test server). But I really do not understand why tomcat hasn't
started up today! Maybe this is also worth knowing: the first two
error messages also appear in the log when tomcat restarts properly,
but for the rest, there are no error messages at all.
I'm kind of desperate because I really don't know what to do. Might
there be some problem with the shell script? Or the cron job? Is there
a known tomcat bug or anything else? I really really hope that someone
of you is able to help me or point me into a right direction, I'm out
of ideas and I really don't know what else I can do anymore in order
to overcome this problem.
Thank you very much in advance,
Regards,
Lara
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org