Migrating Confluence and Jira from Atlassian Cloud to Server breaks Jira gadgets on Confluence

Still need help?

The Atlassian Community is here for you.

Ask the community

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 gadgets stop working and can throw errors such as HTTP 500 Internal Server Errors. Besides, URLs are pointing to the old Jira Base URL

Diagnostics

The following appears in the atlassian-confluence.log:

Error rendering macro 'gadget' : The gadget at https://<OLD_URL>/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml was not added to this Confluence instance yet.
.
OR
.
Unhandled exception occurred whilst decorating page
 -- url: /plugins/servlet/gadgets/makeRequest | userName: sysadmin | referer: http://Confluence_URL/plugins/servlet/gadgets/ifr?container=atlassian&mid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxchart%2Fgadgets%2Fgreenhopper-hour-burndown-chart.xml&libs=auth-refresh
java.lang.NullPointerException
	at com.atlassian.gadgets.renderer.internal.http.TrustedAppContentFetcherFactory.createCertificate(TrustedAppContentFetcherFactory.java:70)
	at com.atlassian.gadgets.renderer.internal.http.TrustedAppContentFetcherFactory.addTrustedAppHeaders(TrustedAppContentFetcherFactory.java:52)
	at com.atlassian.gadgets.renderer.internal.http.TrustedAppContentFetcherFactory.fetch(TrustedAppContentFetcherFactory.java:46)
	at org.apache.shindig.gadgets.servlet.MakeRequestHandler.fetch(MakeRequestHandler.java:84)

Cause

After moving the instances from the Atlassian Cloud to an Atlassian Server environment, the application links continue to make a reference to the CLOUD application link URL, and the gadgets stop working correctly due to corruption on the KEYSTORE table.

CONFSERVER-28954 - Getting issue details... STATUS will ultimately resolve this issue

Workaround

This guide will involve a lot of database manipulation; we strongly advise creating a staging environment for safety measures because, in case of problems, production data will not be affected.

  1. Delete your application link from both JIRA and Confluence side.
  2. Shutdown Confluence.
  3. Back up your Confluence database.
  4. Run the following query:

    DELETE FROM keystore WHERE alias LIKE '%confluence%'
  5. Follow the steps in the 'Workaround' section from CONFSERVER-93646 - Getting issue details... STATUS  to re-initialize the KEYSTORE table.
    (info) NOTE: For older Confluence versions, please see CONFSERVER-11074 - Getting issue details... STATUS  and ensure that you are using the correct version of the initKeyStore JSP file for your instance.
  6. After following those steps recreate your application Link.
  7. Check again if the gadgets are working.

If you have questions, please contact Atlassian Support.

If your Jira Macro Issues are still pointing to the JIRA cloud instance, you will also need to follow the steps outlined in our KB How to bulk update JIRA Issue Macro to point to a different JIRA instance to bulk edit those issues to point to the correct instance.

(warning) Please note this issue is also observed when moving instances from one Atlassian Server to another. The gadgets window appears blank, along with the same errors seen in atlassian-confluence.log  as documented above. 

Last modified on Dec 4, 2024

Was this helpful?

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