users@glassfish.java.net

Virtual Servers not working correctly on Glassfish

From: <glassfish_at_javadesktop.org>
Date: Sat, 28 Mar 2009 13:03:57 PDT

I have odd behavior going on with my glassfish v2.1 virtual servers with two particular webapps, and I'm wondering if anyone has run across this or might know how to fix. Here is what I've done:
- Pointed two different subdomain names in the domain DNS management (LONG ago) to my web server IP (i.e. webapp1.domain.com, webapp2.domain.com)
- Deployed the two different webapp war files in Glassfish - named webapp1, webapp2. Context root of each is also webapp1, webapp2 (I did not point the web applications at the virtual server here so that I can still access each by context root path, instead I did this on the virtual server "default web module" setting, which I assume should be fine).
- Created new virtual hosts also named the same webapp1, webapp2 (I also tried naming them something different in case of naming conflicts, etc). Added the respective webapp1, webapp2 web apps as each's default web module, plugged in appropriate respective subdomain names in each, etc. Added http-listener-1 as the listener for each (which is the listener I am actively using, etc).

I can access each webapp just fine by their context root path. Yet when I try to go to the subdomains in a browser which should be correctly bringing up the proper virtual server webapp, it just goes to the http-listener-1 default web module page (aka "Welcome to Glassfish"). If I change the http-listener-1 default web module to one or the other of my custom webapps, it will appropriately show that webapp. However this is not the correct behavior, as I need each of them to work independently.. I have a few other webapps on this same system using SAME domain DNS management and they are working correctly, but for some reason, not these particular two! I have spent too many hours on this and tried everything I can think of, inlcuding fully reinstalling glassfish from scratch - Same exact behavior. When I look at server.log I can even see that it is seeing the correct Host Header that I've specified for the virtual server(!) However it still does not bring up the virtual server correctly! The only errors I can see in the log files are below, but I am having a hard time finding any info about these errors. But perhaps a clue lies with these. Any insight would be highly appreciated... Thanks much in advance:

[#|2009-03-28T18:47:20.874-0500|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=33;_ThreadName=Thread-139;_RequestID=d02c0b30-97d6-4758-8a3f-3fb6be7243f0;|
Fri Mar 27 18:47:20 CDT 2009 WARN: Invalid value {1} for server variable named {0}, falling back to sane default of {2}.|#]


[#|2009-03-28T18:41:29.049-0500|WARNING|sun-appserver2.1|javax.enterprise.system.tools.admin|_ThreadID=26;_ThreadName=httpWorkerThread-7004-3;LifecycleException: java.lang.Exception: No context matching /webapp1 deployed on virtual server webapp1;_RequestID=cf666f4b-7203-4e84-9f8f-f9fce1fbe0c0;|ADM5603:Event listener error [LifecycleException: java.lang.Exception: No context matching /webapp1 deployed on virtual server webapp1]|#]
[Message sent by forum member 'scit' (scit)]

http://forums.java.net/jive/thread.jspa?messageID=339452