Jira Chart Macro not able to display image and getting 401 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

   

Summary

Jira Chart Macro cannot display images as it is failing to download the chart files from Jira Server.


Environment

  • Confluence version 7.3.3
  • Custom SSO is being used for authentication.

Diagnosis

The HTTP request from Jira Chart macro returns 401 error like the following:

2020-09-26 16:44:28,838 ERROR [http-nio-8090-exec-16] [confluence.plugins.jiracharts.JiraChartMacro] getCustomPlaceholder Error getting Jira Chart Macro image placeholder
 -- referer: https://confluence.test.com/display/TS/test | url: /plugins/viewsource/viewpagesrc.action | traceId: xxxx | userName: xxx | action: viewpagesrc
com.atlassian.confluence.macro.MacroExecutionException: com.atlassian.sal.api.net.ResponseException: Can not retrieve jira chart image
...
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://jira.test.com/charts?filename=jfreechart-onetime-xxxx.png
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)

Cause


The Jira chart is created on the Jira server on the fly and Confluence downloads the chart file with an HTTP request. With the custom SSO, the HTTP request redirects to SSO and fails with a 401 (Unauthorized) error.  The same error did not happen on the Crowd SSO(SAML), so the issue could be specific to the custom SSO being used.

Solution

The custom SSO configuration need to be reviewed and reconfigured in a way that HTTP request from the Jira chart macro file can be downloaded without authentication for the SSO.

Last modified on Dec 16, 2020

Was this helpful?

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