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.

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  PLUGWEB-410 - Getting issue details... STATUS  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.