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

Problem

Jira gadgets stop working and can throw errors such as HTTP 500 and URLs pointing to the old base URL of Jira.

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 a Atlassian Server environment, the application links continue to make a reference to the CLOUD application link URL the and gadgets stop working correctly due a corruption on the KEYSTORE table.

 (info) NOTE:  CONFSERVER-28954 - Keystore table is empty post migrating from Confluence Cloud will ultimately resolve this issue

Workaround

This guide will involve a lot of database manipulation, we strongly advise to create 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.
  2. Shutdown Confluence.
  3. Backup your Confluence database.
  4. Run the following query:

    DELETE FROM keystore WHERE alias LIKE '%confluence%'
  5. Follow the steps from CONFSERVER-11074 so we can reset your KEYSTORE table.
    (info) The JSP file shared in this bug report was tested and confirmed working with the 7.x versions.
  6. Ensure that you are using the correct version of the initKeyStore JSP file for your instance.
  7. After following those steps recreate your application Link.
  8. Check again if the gadgets are working.

If you have questions, please contact Support.

If your Jira Macro Issues are still pointing to the JIRA cloud instance, you will also need to follow this guide 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 the another. The gadgets window appears blank along with same errors seen in atlassian-confluence.log as documented above. 

Last modified on Feb 10, 2023

Was this helpful?

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