In Confluence Data Center, the Jira Chart Macro fails to render

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Jira Chart Macro, specifically the Pie Chart and Created and Resolved macro, are not displaying properly in Confluence.

Environment

Tested in Confluence Data Center 7.19.9 and Jira 8.20.11.

Diagnosis

  • When attempting to insert the Jira Charts macro onto a Confluence page, users are met with the following error in the UI:
    • com.atlassian.sal.api.net.ResponseException: Can not retrieve jira chart image
  • Examining the logs reveals the following error. Notice the 404 at the end.

    2023-09-19 19:14:59,785 WARN [http-nio2-8090-exec-84 url: /plugins/macrobrowser/browse-macros.action; user: [email]] [plugins.gadgets.metadata.GadgetsMacroMetadataProvider] generateMacroMetadata Unable to parse gadget spec [ https://<jiraURL>/rest/gadgets/1.0/g/plugin.tts:tts-gadget-slaStatus/gadgets/slastatus-piechart-gadget.xml ]: org.apache.shindig.gadgets.GadgetException: Unable to retrieve gadget xml. HTTP error 404 
  • Curling the endpoints reveals SSO is blocking the requests. For example:
    • Test 1
      curl -k -i -A 'Java/1.8.0_212' https://<jiraURL>/charts?filename=jfreechart-onetime-123413183806312345.png
    • Test 2
      curl -k -i -A 'Java/1.8.0_211' https://<jiraURL>/charts?filename=jfreechart-onetime-123413183806312345.png
    • Test 3
      curl -k -i -A 'Java/11.0.8' https://<jiraURL>/charts?filename=jfreechart-onetime-123413183806312345.png
    • Test 4
      curl -k -i -A 'Apache-HttpClient/4.5.13' https://<jiraURL>/charts?filename=jfreechart-onetime-123413183806312345.png
  • Results from troubleshooting steps above show SSO is intercepting requests to Jira. For example:
    • [confluence@confluence-1 confluence_home]$ curl -k -i -A 'Apache-HttpClient/4.5.13' https://<jiraURL>/charts?filename=jfreechart-onetime-123413183806312345.png 
      HTTP/1.1 302 Moved Temporarily
      Server: Duo/1.0
      Date: Wed, 11 Oct 2023 18:01:44 GMT
      Content-Type: text/html
      Content-Length: 140
      Connection: keep-alive
      Location: <url>.com/check?final_redirect=eyJ1cmwiOiAiaHR0cHM6Ly9qaXJhLmNvcnAuYXBwZHluYW1pY3MuY29tL2NoYXJ0cz9maWxlbmFtZT1qZnJlZWNoYXJ0LW9uZXRpbWUtMTIzNDEzMTgzODA2MzEyMzQ1LnBuZyIsICJzdmMiOiAiamlyYS5jb3JwLmFwcGR5bmFtaWNzLmNvbSJ9%7C54.189.193.9%7C1697047304%7C06cf3c120372574e2919a5ee5eac3f64fc0ce0bacf7b1bc5abb31f1f05e20891
      Strict-Transport-Security: max-age=31536000
      <html>
      <head><title>302 Found</title></head>
      <body>
      <center><h1>302 Found</h1></center>
      <hr><center>Duo/1.0</center>
      </body>
      </html>

Cause

  • CURL results show that multi-factor authentication (Duo, in this case) is intercepting requests from Confluence to Jira, and is expecting multi-factor authentication process to be completed before request to Jira will be served. 


Solution

  • Exclude request URL from SSO login process. In this case, we excluded the URL below, which resolved the issue.
    • https://<jiraURL>.com/charts



Last modified on Jun 18, 2024

Was this helpful?

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