Elements in Jira server fail to render with 400 bad request error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Elements fail to render in Jira.  Symptoms could be a missing sidebar, the "Link Issue" dialog popping up and showing the spinning icon forever, etc. 

Diagnosis

Environment

  • Jira 7.1 and above
    • Especially common when upgrading to 7.3.2+ when using Jira Service Management
  • Proxy: IIS

Diagnostic Steps

  • Capture a HAR file for the page that is displaying incorrectly and review it for HTTP 400 errors. 
  • Examine the URL for one of the errors and check the length of the longest URL segment. (Note that this isn't the same thing as the length of the entire URL)

If the segment is longer than 260 characters, try truncating it to 260 characters and then testing if the request still returns an error (e.g. by navigating to that URL in your browser).  If the truncated version yields a different result, then you are likely running into this issue. 

Cause

Certain batch URLs for Jira are generated in a way that results in very long URL segments, which can result in this problem when using IIS as the proxy in front of Jira due to the default behavior of a 260 character maximum for URL segments.  This is documented more in  Unable to locate Jira server for this macro. It may be due to Application Link configuration.  and to some extent  JRASERVER-64917 - Getting issue details... STATUS

Resolution

It is possible to modify the Windows Registry of the IIS server and increase the UrlSegmentMaxLength value to handle more characters, which is also noted in our documentation for Integrating Jira applications with IIS:

  1. Backup the Registry
  2. With Regedit, browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
  3. Find the value for UrlSegmentMaxLength, or if it doesn't exist add a DWORD value with this name and change it to 00001000 (this is the hex for 4096)

    Powershell alternative:

    Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\HTTP\Parameters -Name UrlSegmentMaxLength -Value 4096 -type DWord

After using either method to adjust the registry (Regedit or Powershell), you must restart Windows for the changes to take effect. This will necessitate downtime, please plan a maintenance window accordingly.


 

Last modified on Nov 23, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.