Unable to Attach File into JIRA via HTTPS

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Summary

Symptoms

  • User can attach file into JIRA when HTTP connection is used. However, the same file can't be attached when JIRA is accessed via HTTPS.

  • JIRA is integrated with Mod JK proxy

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 /rest/internal/1.0/AttachTemporaryFile [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service java.lang.IllegalArgumentException: Header message of length [8,194] received but the packetSize is only [8,192] at org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:380) at org.apache.coyote.ajp.AjpProcessor.receive(AjpProcessor.java:331) ...

Diagnosis

Check if the JIRA's server.xml has AJP connector enabled:

1 <Connector port="8009" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

Cause

AJP connector does not have maxHttpHeaderSize but the equivalent parameter accepted is packetSize which by default set to 8192. However, there seems to be known problem with packetSize and SSL with AJP connector. To quote Apache Tomcat AJP's documentation :

Problems with the default value have been reported when sending certificates or certificate chains.

Solution

Workaround

  • increase the packetSize in JIRA's server.xml and max_packet_size in the Mod JK configuration OR

  • investigate on the certificate and the certificate chains in the Mod JK side and fix it in the proxy side

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.