AppLink Corrupted Error in Confluence
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Sometimes we get the below Warning message in the Confluence application logs. This is releated to App link corruption.
2021-02-10 13:25:52,418 WARN [Caesium-1-4] [atlassian.applinks.core.DefaultApplicationLinkService] retrieveApplicationLink Couldn't find type id for application link with id 973662fd-910f-3593-897f-b0464b2fc5fb. Link is corrupted
2021-02-10 13:26:52,418 WARN [Caesium-1-4] [atlassian.applinks.core.DefaultApplicationLinkService] retrieveApplicationLink Couldn't find type id for application link with id 973662fd-910f-3593-897f-b0464b2fc5fb. Link is corrupted
Diagnosis
- We can check the App link configuration in Confluence Support Zip and Jira App link ServerID.
Also, we can run the CURL command and SQL for getting any App link that is corrupted in the Database and matches the corrupted link SERVERID from the CURL Command and SQL output.
CURL
In the below CURL command, can you please change the Username and Password and change the Confluence Base URL.
curl -s -X GET -u <username>:<password> -H "Accept: application/json" <Confluence-Base-URL>/rest/applinks/1.0/listApplicationlinks | python -mjson.tool
SQL
Please execute the below SQL and provide me the result.
select * from bandana where bandanakey like '%applink%';
If you get such output like below where 2 APP Link ID found in the Bandana Table and in that 1 is active and other is the corrupted one and matching with the Warning message.
BANDANAID BANDANACONTEXT BANDANAKEY BANDANAVALUE 12 _GLOBAL applinks.global.application.ids <list>
<string>973662fd-910f-3593-897f-b0464b2fc5fb</string>
<string>603c9d5b-36dd-3890-b7a5-f6504b043c69</string>
</list>
Cause
Sometimes, App Link deletion is not proper and failed in between that can cause the App link corruption. Because of that, some Data will be left in the Database and that can cause this App link corruption Warning messages in the Application logs.
Solution
The Only solution for fixing this corruption is, remove the corrupted records from the Database and update the applinks.global.application.ids with proper/active App link ID.
Stop the Confluence.
Execute below the Update statment where we are just supplying the active APP link ServerID.
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
UPDATE BANDANA SET BANDANAVALUE = '<list> <string>603c9d5b-36dd-3890-b7a5-f6504b043c69</string> </list>' WHERE BANDANAKEY = 'applinks.global.application.ids'; commit;
Start the Confluence.
This will fix the App Link Corruption Warning Messages from the Logs.