Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-79621

Using a Context Path in Tomcat causes logIgnoredSymlink Warnings in Catalina Output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.18.1, 7.19.5
    • None

      Problem

      Whilst configuring Tomcat to use a context path for the Confluence application, we see warning messages appearing in the Catalina logs

      Environment

      Reproduced locally using Confluence version 7.18.1 on a Windows Operating System

      Steps to Reproduce

      1. Create a Vanilla Confluence Server 7.18.1 instance on a Windows OS Server
      2. Use server.xml definition below for instance:
        server.xml
        [...]
        <Server port="8000" shutdown="SHUTDOWN" debug="0">
            <Service name="Tomcat-Standalone">
                <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                           maxThreads="48" minSpareThreads="10"
                           enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                           protocol="org.apache.coyote.http11.Http11NioProtocol"/>
        
                <Engine name="Standalone" defaultHost="localhost" debug="0">
                    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
                        <Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                            <!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                            <Manager pathname=""/>
                            <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>
                        </Context>
                    </Host>
        	</Engine>
            </Service>
        </Server>
        [...]
        
      3. Restart Confluence and monitor the Tomcat output logs

      Expected Results

      The Tomcat logs should be cleared of warnings mentioning logIgnoredSymlink

      Actual Results

      The Tomcat logs can display such warning logs :

      catalina log
      [...]
      WARNING [http-nio-8090-exec-3] org.apache.catalina.webresources.AbstractFileResourceSet.logIgnoredSymlink Resource for web application [/confluence] at path [/images/brand-image-source.] was not loaded as the canonical path [/images/brand-image-source] did not match. Use of symlinks is one possible cause.
      [...]
      

      Workaround

      From the testing, the issue is not noticed when not using a context path in Tomcat configuration

      Notes

      More notes will be added as testing progresses

              Unassigned Unassigned
              2e857505f334 Pascal Oberle
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: