You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bear Giles <bg...@coyotesong.com> on 2008/01/11 16:39:08 UTC

[vhost] problem restarting virtual tomcat hosts

Summary: my virtual tomcat hosts are not coming up after a tomcat 
restart, but they do come up once I remove /ROOT.  'start' via the 
manager does not suffice.

Details:
I have several virtual hosts under both tomcat 6.0.14 and apache, linked 
via mod_jk.  The virtual tomcat hosts are located under

   webapps/vhost1 (etc)

with appropriate <Host> entry in conf/server.xml.  I know the setup is 
valid since I will get the expected contents from 
webapp/vhost1/ROOT/index.jsp when I hit http://vhost1.com/.

Each virtual host has its own copy of manager so I can control the vhost 
at http://vhost1.com/manager/html.  Most importantly, I can deploy new 
war files via this interface.  The upload war files are exploded, as 
expected.

The problem occurs when I cycle the tomcat server for some reason, e.g., 
when defining a new virtual host or after a system reboot.  The logs say 
the error is an IllegalArgumentException: "Document base /vhost1 does 
not exist or is not a readable directory". In fact the file does exist, 
is readable, etc.

If I manually nuke the directory then the watcher will explode the war 
file and the application will start as expected.

Any ideas?  I suspect I've just overlooked something in the config files.

BTW I want to keep separate vhost directories since this is a shared 
j2ee appserver.  I trust my colleagues but we need to be able to assure 
our respective clients that we've taken all reasonable and prudent steps 
to keep our webapps isolated.

Thanks,

Bear


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


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
Caldarale, Charles R wrote:
> There is no appBase attribute for a <Context>; appBase belongs to a
> <Host> element.
>
> I'd still like to see the _exact_ <Context> elements for each webapp,
> and their _exact_ location.
>
> Have you changed anything in your server.xml since you posted it
> earlier?
>
> Is there anything in the logs showing deployment failure?
>
>  - Chuck
>   
No errors in the log file, as far as I can find.

Bear

RE: [vhost] problem restarting virtual tomcat hosts

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Bear Giles [mailto:bgiles@coyotesong.com] 
> Subject: Re: [vhost] problem restarting virtual tomcat hosts
> 
> It's actually the one I sent earlier, but with the appbase and 
> docbase(?) attributes removed.

There is no appBase attribute for a <Context>; appBase belongs to a
<Host> element.

I'd still like to see the _exact_ <Context> elements for each webapp,
and their _exact_ location.

Have you changed anything in your server.xml since you posted it
earlier?

Is there anything in the logs showing deployment failure?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
After redeploying many times the second webapp is now coming up.  I 
don't know why it suddenly stopped working, but I verified the app comes 
up after bouncing the server.

Thanks for the help.

Bear

Bear Giles wrote:
> It's commented out in the tomcat/conf context file.
>
> The webapp that's loading has
>
> <Manager classname="o.a.catalina.session.PersistentManager" 
> saveOnRestart="false"/>
>
> The webapp that's not loading is unexploded, but would be the same.
>
> There's no entry in the vhost/manager/META-INF/context.xml files.
>
> Bear


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


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
It's commented out in the tomcat/conf context file.

The webapp that's loading has

<Manager classname="o.a.catalina.session.PersistentManager" 
saveOnRestart="false"/>

The webapp that's not loading is unexploded, but would be the same.

There's no entry in the vhost/manager/META-INF/context.xml files.

Bear

Martin Gainty wrote:
> Bear-
>
> whats the pathname that StandardManager implements ?
> in <webapp>context.xml look for something like
> <Manager className="org.apache.catalina.session.StandardManager"
> pathname=""/>
>
> Anyone else?
> Martin-
> ----- Original Message -----
> From: "Bear Giles" <bg...@coyotesong.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Friday, January 11, 2008 1:50 PM
> Subject: Re: [vhost] problem restarting virtual tomcat hosts
>
>
>   
>> Caldarale, Charles R wrote:
>>     
>>>> From: Bear Giles [mailto:bgiles@coyotesong.com]
>>>> Subject: Re: [vhost] problem restarting virtual tomcat hosts
>>>>
>>>> That took care of one of the virtual hosts, but a second isn't even
>>>> exploding now.  It's very confusing since the configurations
>>>> are identical.
>>>>
>>>>         
>>> What's in the other <Context> elements and where are they located?
>>>
>>>  - Chuck
>>>
>>>       
>> It's actually the one I sent earlier, but with the appbase and
>> docbase(?) attributes removed.
>>
>> I guess what's most confusing is that the war file isn't getting
>> exploded.  I just touched the ROOT.war file and the log entries are:
>>
>> o.a.catalina.startup.HostConfig checkResources
>> INFO: Undeploying context[]
>> o.a.catalina.session.PersistentManagerBase start
>> SEVERE: No Store configured, persistence disabled
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


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


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Martin Gainty <mg...@hotmail.com>.
Bear-

whats the pathname that StandardManager implements ?
in <webapp>context.xml look for something like
<Manager className="org.apache.catalina.session.StandardManager"
pathname=""/>

Anyone else?
Martin-
----- Original Message -----
From: "Bear Giles" <bg...@coyotesong.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Friday, January 11, 2008 1:50 PM
Subject: Re: [vhost] problem restarting virtual tomcat hosts


> Caldarale, Charles R wrote:
> >> From: Bear Giles [mailto:bgiles@coyotesong.com]
> >> Subject: Re: [vhost] problem restarting virtual tomcat hosts
> >>
> >> That took care of one of the virtual hosts, but a second isn't even
> >> exploding now.  It's very confusing since the configurations
> >> are identical.
> >>
> >
> > What's in the other <Context> elements and where are they located?
> >
> >  - Chuck
> >
> It's actually the one I sent earlier, but with the appbase and
> docbase(?) attributes removed.
>
> I guess what's most confusing is that the war file isn't getting
> exploded.  I just touched the ROOT.war file and the log entries are:
>
> o.a.catalina.startup.HostConfig checkResources
> INFO: Undeploying context[]
> o.a.catalina.session.PersistentManagerBase start
> SEVERE: No Store configured, persistence disabled
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
Caldarale, Charles R wrote:
>> From: Bear Giles [mailto:bgiles@coyotesong.com] 
>> Subject: Re: [vhost] problem restarting virtual tomcat hosts
>>
>> That took care of one of the virtual hosts, but a second isn't even 
>> exploding now.  It's very confusing since the configurations 
>> are identical.
>>     
>
> What's in the other <Context> elements and where are they located?
>
>  - Chuck
>   
It's actually the one I sent earlier, but with the appbase and 
docbase(?) attributes removed.

I guess what's most confusing is that the war file isn't getting 
exploded.  I just touched the ROOT.war file and the log entries are:

o.a.catalina.startup.HostConfig checkResources
INFO: Undeploying context[]
o.a.catalina.session.PersistentManagerBase start
SEVERE: No Store configured, persistence disabled

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


RE: [vhost] problem restarting virtual tomcat hosts

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Bear Giles [mailto:bgiles@coyotesong.com] 
> Subject: Re: [vhost] problem restarting virtual tomcat hosts
> 
> That took care of one of the virtual hosts, but a second isn't even 
> exploding now.  It's very confusing since the configurations 
> are identical.

What's in the other <Context> elements and where are they located?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
Caldarale, Charles R wrote:
>> From: Bear Giles [mailto:bgiles@coyotesong.com] 
>> Subject: Re: [vhost] problem restarting virtual tomcat hosts
>>
>> Here's the server.xml and one of the context.xml files.  The other 
>> virtual hosts have essentially the same context.xml files.
>>     
>
> Assuming your context.xml is in the webapp's META-INF directory, the
> path and docBase attributes are not allowed and must be removed.  The
> invalid docBase may well be what's causing the problem.
>
>  - Chuck
>   
That took care of one of the virtual hosts, but a second isn't even 
exploding now.  It's very confusing since the configurations are identical.

Bear

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


RE: [vhost] problem restarting virtual tomcat hosts

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Bear Giles [mailto:bgiles@coyotesong.com] 
> Subject: Re: [vhost] problem restarting virtual tomcat hosts
> 
> Here's the server.xml and one of the context.xml files.  The other 
> virtual hosts have essentially the same context.xml files.

Assuming your context.xml is in the webapp's META-INF directory, the
path and docBase attributes are not allowed and must be removed.  The
invalid docBase may well be what's causing the problem.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [vhost] problem restarting virtual tomcat hosts

Posted by Bear Giles <bg...@coyotesong.com>.
Caldarale, Charles R wrote:
>> From: Bear Giles [mailto:bgiles@coyotesong.com] 
>> Subject: [vhost] problem restarting virtual tomcat hosts
>>
>> The logs say the error is an IllegalArgumentException:
>> "Document base /vhost1 does not exist or is not a
>> readable directory".
>>     
>
> Sounds like you may have a conflict between appBase and docBase
> settings.  Please post your server.xml and any <Context> elements you
> have.
>
>  - Chuck
>   
Here's the server.xml and one of the context.xml files.  The other 
virtual hosts have essentially the same context.xml files.

The conf/context.xml file only has a 
<WatchedResource>WEB-INF/web.xml</WatchedResource> entry.

Bear

RE: [vhost] problem restarting virtual tomcat hosts

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Bear Giles [mailto:bgiles@coyotesong.com] 
> Subject: [vhost] problem restarting virtual tomcat hosts
> 
> The logs say the error is an IllegalArgumentException:
> "Document base /vhost1 does not exist or is not a
> readable directory".

Sounds like you may have a conflict between appBase and docBase
settings.  Please post your server.xml and any <Context> elements you
have.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org