users@glassfish.java.net

Glassfish 2.1 not serving static files when default application is set

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Jul 2009 03:19:56 PDT

Hi,

I'm having a strange behaviour with GF 2.1 (v2.1 Patch02 (9.1_02 Patch08)), when using vhosts with a default application and static files in the docroot.
I have a DAS and many instances, not in a cluster mode.
I use a static file "status.htm" to check if my application is up or not. This file is maintained by a script and is put in the docroot of my instances.
ex :
cat /opt/appserv/SUNWappserver/nodeagents/masteragent/accounts/docroot/status.htm
<HTML><BODY>ENABLE</BODY></HTML>

Sometime, my monitoring script receive a 404 instead of this file. I can also see thant in the GF access log :

10.16.248.10 - - [21/Jul/2009:11:14:17 +0100] "GET /accounts/status.htm HTTP/1.0" 404 3170 "-" "check_http/v2053 (nagios-plugins 1.4.13)"
10.16.248.10 - - [21/Jul/2009:11:50:17 +0100] "GET /accounts/status.htm HTTP/1.0" 404 3170 "-" "check_http/v2053 (nagios-plugins 1.4.13)"
10.16.248.10 - - [21/Jul/2009:11:57:13 +0100] "GET /accounts/status.htm HTTP/1.0" 404 3170 "-" "check_http/v2053 (nagios-plugins 1.4.13)"

The strange things are :
- when the check work, nothing is set in the acces log file
- when the check does not work (404), the logs show "/accounts/status.htm" where it should say "/status.htm"

Here is the HTTP request :
GET /status.htm HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: compte.rtl.fr:26080

Conclusion is, sometimes, GF is not looking for static files in the right place...
I really don't know what else to check...

PS :
I tried with status.html, and had the same error. I first thought the problem was due to the mapping of HTML files from the web.xml, so I changed it to ".htm"
[Message sent by forum member 'prune' (prune)]

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