Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-70222

Context path duplicated when Jira performs self-request for Activity Stream Gadget

    XMLWordPrintable

Details

    Description

      Issue Summary

      Context path is duplicated when Jira performs self-request for Activity Stream Gadget, if the subdomain contains the same word as the context path. For example: jira.domain.com/jira or something.domain.com/something

      The symptom looks similar to CONFSERVER-53081, but in this case the instance does not need to be linked to a Confluence instance.

      Environment

      1. Jira 8.3.4
      2. Unable to reproduce in Jira 7.13.11

      Steps to Reproduce

      1. Let's say Jira instance hostname is jira.domain.com
      2. Set context path to /jira, so the base URL would be jira.domain.com/jira
      3. This can also be reproduced if the hostname is jira-something1.domain.com, and context path is jira
        If you are testing this with a dummy domain, add the domain/IP into both your PC and Jira server's host file to point to the Jira server's IP address

      Expected Results

      1. Activity Stream Gadget works fine

      Actual Results

      1. Activity Stream Gadget displays the following error:
      2. In the HTTP access logs, it shows that the self-request fails:
        10.60.3.46 i867x450x3 jiraadmin [08/Nov/2019:14:27:49 +0800] "POST http://something.domain.com:8080/something/something/rest/webResources/1.0/resources HTTP/1.1" - - - - "Apache-HttpClient/4.5.5 (Java/1.8.0_74)" "1ghmye1"
        10.60.3.46 o867x450x3 jiraadmin [08/Nov/2019:14:27:49 +0800] "POST http://something.domain.com:8080/something/something/rest/webResources/1.0/resources HTTP/1.1" 404 0 0.0240 - "Apache-HttpClient/4.5.5 (Java/1.8.0_74)" "1ghmye1"

      Workaround

      1. Avoid having the same context path as the subdomain.
        OR
      2. Add a rewrite rule in Tomcat to remove the duplicate context path
        • Add <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
          into server.xml just above </host>
        • create a file named rewrite.config in Jira_install/conf/Catalina/localhost path
        • Add the following into rewrite.config
          RewriteRule ^/contextpath/contextpath/(.*)$ /contextpath/$1

          Please make sure to change 'contextpath' to the actual context path you're using

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tchai Tzu Hau Chai (Inactive)
              Votes:
              14 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: