You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Otmar Manuela <ot...@caribmedia.com> on 2010/03/01 15:19:20 UTC

Issues with ROOT.xml in Tomcat 6.0.24

Hi,

I have a tomcat instance of Tomcat 6.0.24 running, but whenever I deploy 
my application in the root context, I can only start it once.  If  I 
restart, I get a 404 error "The requested resource is unavailable".  I 
noticed that if I remove the 
<tomcat-instance>/conf/Catalina/localhost/ROOT.xml and then restart, it 
restarts fine, but it adds ROOT.xml back into this directory.

I know I can create a startup script that removes ROOT.xml before 
starting the tomcat instance (and I believe I will do this for now), but 
I wonder if this is a bug or if there is something I need to configure.  
I have a few Tomcat 5.5 instances and one Tomcat 6.0.18 instance running 
the same application without having this issue on other servers.  In 
fact, I see that on the other servers, the 
<tomcat-instance>/conf/Catalina/localhost/ROOT.xml is not even created 
when the server starts.   I also have another server running Tomcat 
6.0.24 with the same application, but using a context other than ROOT 
and this also runs fine, so to me the issue seems to be related to 
Tomcat 6.0.24 and using the ROOT context.

Any ideas what could be causing this?

Otmar

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


RE: Issues with ROOT.xml in Tomcat 6.0.24

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Otmar Manuela [mailto:otmar@caribmedia.com]
> Subject: Re: Issues with ROOT.xml in Tomcat 6.0.24
> 
> This is the output of catalina.out when the instance starts and
> ROOT.xml is not deleted beforehand:

And that's the situation that results in a 404 upon first reference?  What's in the logs when the 404 occurs?  (Note that you may have to take Tomcat down to get the logs flushed out in 6.0.24, depending on the JRE you're running on.)

> Mar 1, 2010 8:52:37 AM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor ROOT.xml

The above indicates the default webapp is being deployed.  What's in ROOT.xml?

> Normally, tomcat takes 6 seconds to start up successfully with the
> application, but here it starts up in just 1.5 seconds.

That's not unusual when the webapps are all already deployed.

> The "restart" is nothing more than manually running a shutdown script
> (which sets the environment variables and then runs 'catalina.sh stop'),
> wait to make sure the process is gone, then manually run a startup
> script (which sets the environment variables and then runs 'catalina.sh
> start').

And is anything else done in between the shutdown and startup?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Issues with ROOT.xml in Tomcat 6.0.24

Posted by Otmar Manuela <ot...@caribmedia.com>.
On 3/1/2010 11:05 AM, Caldarale, Charles R wrote:
>> From: Otmar Manuela [mailto:otmar@caribmedia.com]
>> Subject: Issues with ROOT.xml in Tomcat 6.0.24
>>
>> I have a tomcat instance of Tomcat 6.0.24 running, but whenever I
>> deploy my application in the root context, I can only start it once.
>> If I restart, I get a 404 error "The requested resource is unavailable".
>>      
> What's in the Tomcat logs?
>    
This is the output of catalina.out when the instance starts and ROOT.xml 
is not deleted beforehand:

Mar 1, 2010 8:52:36 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found
  on the java.library.path: 
/usr/local/jre1.6.0_18/lib/i386/server:/usr/local/jre1.6.0_18/lib/i386:/usr/local/jre1.6.0_18/.
./lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Mar 1, 2010 8:52:37 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8110
Mar 1, 2010 8:52:37 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1274 ms
Mar 1, 2010 8:52:37 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 1, 2010 8:52:37 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Mar 1, 2010 8:52:37 AM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Mar 1, 2010 8:52:37 AM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Mar 1, 2010 8:52:37 AM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 1, 2010 8:52:38 AM org.apache.catalina.startup.HostConfig 
deployDirectory
INFO: Deploying web application directory examples
Mar 1, 2010 8:52:38 AM org.apache.catalina.startup.HostConfig 
deployDirectory
INFO: Deploying web application directory docs
Mar 1, 2010 8:52:38 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8110
Mar 1, 2010 8:52:38 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8039
Mar 1, 2010 8:52:38 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27  config=null
Mar 1, 2010 8:52:38 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1573 ms

Normally, tomcat takes 6 seconds to start up successfully with the 
application, but here it starts up in just 1.5 seconds.

> What exactly is the procedure you're following to do a "restart"?
>
>    
The "restart" is nothing more than manually running a shutdown script 
(which sets the environment variables and then runs 'catalina.sh stop'), 
wait to make sure the process is gone, then manually run a startup 
script (which sets the environment variables and then runs 'catalina.sh 
start').

> Tomcat 6.0.19 and above always copy the<Context>  element to conf/Catalina/[host]/[appName].xml.
>
>    
Thanks for this info.  Good to know this is normal.

Otmar

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


RE: Issues with ROOT.xml in Tomcat 6.0.24

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Otmar Manuela [mailto:otmar@caribmedia.com]
> Subject: Issues with ROOT.xml in Tomcat 6.0.24
> 
> I have a tomcat instance of Tomcat 6.0.24 running, but whenever I
> deploy my application in the root context, I can only start it once.
> If I restart, I get a 404 error "The requested resource is unavailable".

What's in the Tomcat logs?

What exactly is the procedure you're following to do a "restart"?

Tomcat 6.0.19 and above always copy the <Context> element to conf/Catalina/[host]/[appName].xml.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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