Bug 17867 - new virtual host doesn't work after restart
Summary: new virtual host doesn't work after restart
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Webapps:Administration (show other bugs)
Version: 4.1.18
Hardware: PC All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-11 11:06 UTC by Antony Seredkin
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments
This is my configuration. Also, go to http://www.cltractor.com to see this not working. (10.66 KB, text/xml)
2003-06-02 17:26 UTC, Wade Chandler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antony Seredkin 2003-03-11 11:06:38 UTC
While I'm testing new host with new context in current session, it works. after 
restart it reports an error "HTTP Status 500 - No Context configured to process 
this request"
Comment 1 Amy Roh 2003-03-14 18:14:29 UTC
Cannot reproduce.  Make sure you have saved your current the newly added host 
and context information using "commit" before restarting.  Otherwise they will 
be lost after restart.  Please reopen if you can still reproduce the error.
Comment 2 Wade Chandler 2003-06-02 17:26:16 UTC
Created attachment 6601 [details]
This is my configuration.  Also, go to http://www.cltractor.com to see this not working.
Comment 3 Wade Chandler 2003-06-02 17:35:00 UTC
I'm having this same problem.  I go into the admin application and add a virtual
host.  Everything will work for a while.  Then it appears that after the log
file is updated I have problems.  I have noticed that with autodeploy if i have
a WEB-INF directory under a directory then I will have a new context deployed in
my file.  Thus the server.xml file has been overwritten.  I also notice that
when I change the file with VI I have problems after a save and restart.  I have
yet to figure out how to add a vhost by the text file.  When I do it just
doesn't work.  I don't know if it is the xml parser or what, but all I get is no
context configured.  But the same values work when created by the admin tool and
commit changes, but to get it working again I always have to delete the
confiuration (the entire host) then add it all back, aliases, contexts, anything
and everything.  Not good.  I kept it simple this time.  No alias and only one
context other than the default.  And, it still did the same thing.

OS: Red Hat Linux 9
Kernel: 2.4.20-13.9
JDK: 1.4.1_02 SUN  same thing with 1.3.1 SUN
Tomcat: 4.1.24
Comment 4 Wade Chandler 2003-06-02 18:09:02 UTC
Here is some more info.  When I log into my admin after the no context defined
error.  I get this error when I try to click on the Default Context to edit it.
===================================================
type Status report

message Error retrieving attribute debug

description The server encountered an internal error (Error retrieving attribute
debug) that prevented it from fulfilling this request.
====================================================

to correct this the only work around I have found is to remove the configuration
for the vhost and re-enter it all through the admin tool.

:-(
Comment 5 Wade Chandler 2003-06-04 23:27:40 UTC
Well, I couldn't leave the site down long enough to show any body.  So, I
brought it back up.  But, I have to reconfigure every reboot.  Anyways, I guess
I'll bite the bullet and start looking at the start up code for catalina.  I'm a
software engineer and programmer, and java happens to be my forte.  I'll let you
know if I find the problem.  I haven't had a reply as of yet, and I'm not
exactly sure how to get involved in the dev process.  If I find an issue who
should I contact to get it in the code base?  Well, that's it for now.  It's
either I fix it or just use a different server.  But, I really like tomcat.
Comment 6 Mark Thomas 2004-04-24 17:06:01 UTC
This works for me. The steps I followed in the admin app (saving at each 
stage) were:
1. Configured my PC so testhost points to the local machine.
2. Create a new host (testhost).
3. Copy the root webapp to the testhost appbase
4. Add a root context to test host pointing to ROOT
5. Commit the changes so server.xml gets re-written.
6. Restart tomcat

... and it all works.

I was using the latest (built from CVS) version of TC4.