Migrating Confluence and Jira from Atlassian Cloud to Server breaks Jira gadgets on Confluence
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.
- Delete your application link from both JIRA and Confluence side.
- Shutdown Confluence.
- Back up your Confluence database.
Run the following query:
DELETE FROM keystore WHERE alias LIKE '%confluence%'
- Follow the steps in the 'Workaround' section from
CONFSERVER-93646
-
Getting issue details...
STATUS
to re-initialize the KEYSTORE table.
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. - After following those steps recreate your application Link.
- 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.
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.