Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003873 [Resin] minor always 02-03-10 11:43 02-18-10 11:47
Reporter chiefgeek View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.3
Summary 0003873: resin 4.0.3 reports strange error web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory
Description web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory when using 'archive-path

--- resin.xml snippet ---
    <cluster id="dealfinder">
        <!-- sets the content root for the cluster, relative to resin.root -->
        <root-directory>.</root-directory>

        <!-- defaults for each server, i.e. JVM -->
        <server-default>
            <!-- The http port -->
            <http address="*" port="7841" />
            <jvm-arg>-Xmx1024m</jvm-arg>
            <jvm-arg>-XX:MaxPermSize=192m</jvm-arg>
            <!--
            <jvm-arg>-Xdebug</jvm-arg>
            <jvm-arg>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4041</jvm-arg>
            -->
            <jvm-arg>-Dcom.sun.management.jmxremote.port=8841</jvm-arg>
            <watchdog-arg>-Dcom.sun.management.jmxremote</watchdog-arg>
        </server-default>

        <!-- define the servers in the cluster -->
        <server id="dealfinder" address="${MYIP}" port="6841" watchdog-port="6700">
            <!-- server-specific configuration, e.g. jvm-arg goes here -->
            <jvm-arg>-DHQ_INVENTORY_ID=${MYHOSTNAME}.dc.farecompare.com:8841</jvm-arg>
            <jvm-arg>-Dhq.autoinventory.name=website-dealfinder_${MYHOSTNAME}</jvm-arg>
        </server>

        <!-- the default host, matching any host name -->
        <host id="" root-directory=".">
            <access-log path="instances/dealfinder/access.log"
                        format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W" />
            <!--
             - configures an explicit root web-app matching the
             - webapp's ROOT
            -->
            <web-app id="/" root-directory="webapps/dealfinder/ROOT" archive-path="webapps/dealfinder/ROOT.war">
                <listener>
                    <listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
                    <init>
                        <extension>jsp</extension>
                        <extension>jspx</extension>
                        <extension>xtp</extension>
                    </init>
                </listener>
            </web-app>

            <!--
             - Administration application /resin-admin
            -->
            <web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
                <prologue>
                    <resin:set var="resin_admin_external" value="false" />
                    <resin:set var="resin_admin_insecure" value="true" />
                </prologue>
            </web-app>

            <!--
        - Resin documentation - remove for a live site
       -->
            <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc" />

            <!--
        - <resin:LoadBalance regexp="^/load" cluster="backend-tier"/>
        - <resin:HttpProxy regexp="^/http" address="localhost:9000"/>
        - <resin:FastCgiProxy regexp="^/fcgi" address="localhost:9001"/>
       -->
        </host>
    </cluster>
==== end resin.xml snippet ===
Additional Information
Attached Files

- Relationships

- Notes
(0004406)
ferg
02-03-10 12:01

Thanks for the bug report.

Is is possible to get a stack trace of that exception (level='finer' should give that information.)

The issue is a security-related one. Because the host root directory generally has sensitive data (like log files), any web-app must be a sub directory under the root (otherwise anyone might be able to browse the host.)

From the configuration, I can't see the <web-app> with a directory in the host's own root-directory, but it may be in a <host-default> or <cluster-default>.
 
(0004407)
chiefgeek
02-03-10 12:10

Hmm. I guess its not a fatal error because this is all the info I get when changing to finer level logging

[10-02-03 15:08:34.200] {main} Host[default] initializing
[10-02-03 15:08:34.200] {main} Host[default] root-directory=/usr/local/resin/
[10-02-03 15:08:34.219] {main} web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory when using 'archive-path
[10-02-03 15:08:34.222] {main} Host[default] starting
 
(0004412)
chiefgeek
02-03-10 14:28

I just noticed that the war is being expanded into /usr/local/resin/ROOT
 
(0004438)
ferg
02-18-10 11:47

server/1h03
 

- Issue History
Date Modified Username Field Change
02-03-10 11:43 chiefgeek New Issue
02-03-10 12:01 ferg Note Added: 0004406
02-03-10 12:10 chiefgeek Note Added: 0004407
02-03-10 14:28 chiefgeek Note Added: 0004412
02-18-10 11:47 ferg Note Added: 0004438
02-18-10 11:47 ferg Assigned To  => ferg
02-18-10 11:47 ferg Status new => closed
02-18-10 11:47 ferg Resolution open => fixed
02-18-10 11:47 ferg Fixed in Version  => 4.0.4


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed.
29 unique queries executed.
Powered by Mantis Bugtracker