Unable to remove old DVCS connection from within JIRA after upgrade
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
シナリオ 1
If you happened to have had a previous DVCS connection that linked your JIRA instance to a Bitbucket Cloud instance, you might not be able to remove this link from within JIRA if the Bitbucket Cloud account has already been disabled. Within JIRA you can be prompted to try to reset the OAuth, however since the BitBucket Cloud instance has been shutdown/disabled, this isn't possible to complete successfully through JIRA.
シナリオ 2
In the application-jira.log, you are getting the following error message when accessing the DVCS configuration page:
com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: Credential PRINCIPAL_ID is not supported for Bitbucket Cloud.
原因
- The issue appears to happen when the Bitbucket Cloud instance has been shutdown or disabled. Due to this, JIRA can no longer reset the OAuth validation or communicate with that Bitbucket instance.
- Upgrading Jira from 7.x to 8.x or the latest version. The upgrade caused the latest DVCS connector to reject the old credentials from the Bitbucket Cloud.
ソリューション
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
- Run the following SQL command in order to determine what DVCS links exist in your environment:
SELECT * FROM "AO_E8B6CC_ORGANIZATION_MAPPING";
Which should return something like this:
ACCESS_TOKEN ADMIN_PASSWORD ADMIN_USERNAME APPROVAL_STATE AUTOLINK_NEW_REPOS DEFAULT_GROUPS_SLUGS DVCS_TYPE HOST_URL ID 名前 OAUTH_KEY OAUTH_SECRET PRINCIPAL_ID xxxx NULL NULL APPROVED 0 NULL bitbucket https://bitbucket.org 2 <Instance_name> xxxxxx xxxxxx xxxxxx Run the following SQL query to remove the records in AO_E8B6CC_ORGANIZATION_MAPPING table:
delete from "AO_E8B6CC_ORGANIZATION_MAPPING" WHERE "HOST_URL"='https://bitbucket.org';
You might have to restart JIRA once more.
- You can reconfigure the same DVCS configuration to resync all the old data back after being able to access the DVCS page.