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.

   

Summary

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


Environment

7.3.3

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.  But the HTTP request redirects to SSO and fails with a 401 (Unauthorized) error.

Solution

SSO needs to change the configuration to bypass the HTTP request from the Jira chart macro, so the file can be downloaded without authentication for the SSO.

Last modified on Nov 19, 2020

Was this helpful?

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