"Could not remove the Confluence knowledge base configuration" error while trying to Unlink Old Knowledge Base Space in JSM Project Post-Migration

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

"Could not remove the Confluence knowledge base configuration" error is observed when we try to remove Old Knowledge Base Space in JSM Project post-migration from the UI.

診断

  • Following the migration of JSM projects and Confluence spaces, when attempting to remove the Knowledge Base via Project Settings > Knowledge Base > Unlink Space, an error message appears stating, "Could not remove the Confluence knowledge base configuration."
  • This prevents us from linking the newly migrated space to the JSM project.

原因

The error occurs due to the corrupted entries in the database, the space cannot be deleted through the UI.

ソリューション

There are two workarounds to unlink the spaces in the Jira.

Workaround 1 : Executing the Rest API

  • Execute the GET REST API below to identify the space key of the space that needs to be unlinked. You will receive a JSON response from this API call.
REST API CALL
GET /rest/servicedesk/1/servicedesk/DESK/kb/spaces
REST API RESPONSE
{
  "portalSearchBarSettings": {
    "isEnabled": true
  },
  "appLinkId": "8435ef20-4088-3b8c-9ed4-8e4e83b3895b",
  "appLinkName": "Confluence",
  "appLinkUrl": "http://localhost:6857/c857",
  "kbLinks": [
    {
      "spaceKey": "ds",
      "spaceName": "Demonstration Space",
      "spaceUrl": "http://localhost:6857/c857/display/ds"
    }
  ],
  "totalPages": 1,
  "totalEntries": 1,
  "pageIndex": 0,
  "pageSize": 10,
  "maxSpaceCount": 10
}
  • Retrieve the affected space key from the response above, and then proceed with the following REST API call. Upon execution, we will receive a 203 response.
DELETE RESP API CALL
DELETE /servicedesk/1/pages/settings/kb/DESK/unlink?spaceKey=ds


Workaround 2 : Direct Database update in Jira Database.

 

Note: Before executing the SQL, please ensure that a backup of the database is taken as per Backing up the database link. 
The SQL statement provided in the document is compatible with PostgreSQL. We suggest checking with DBA/DB team for the right syntax if you face issues with the DB queries.

 

These are the database tables where we identify problematic records and then delete them.

AO_54307E_CONFLUENCEKB
AO_54307E_CONFLUENCEKBLABELS
AO_54307E_CONFLUENCEKBENABLED


Please follow to the below given steps.

  1. Please take a backup of the database. Please refer to the link below for taking the database backup as per the steps mentioned in Backing up the database page.

       2. Stop Jira. 

       3. Please run the below three select SQL queries and identify the rows which will be deleted from the database.

------Identify the ID of the confluence space that needs to be deleted.------
select * from "AO_54307E_CONFLUENCEKB"
-----Use the ID identified from the above select statement -------
select * from "AO_54307E_CONFLUENCEKBLABELS" where "CONFLUENCE_KBID" = <ID Identified from the first select statement>;
select * from "AO_54307E_CONFLUENCEKBENABLED" where "CONFLUENCE_KBID" = <ID Identified from the first select statement>;

       4. Once the ID is identified, run the below delete commands in the database to remove the affected entry.

delete from "AO_54307E_CONFLUENCEKBLABELS" 
where "CONFLUENCE_KBID" = <ID Identified from the first select statement>; 


delete from "AO_54307E_CONFLUENCEKBLABELS" cl 
where cl."CONFLUENCE_KBID" = <ID Identified from the first select statement>;


delete from "AO_54307E_CONFLUENCEKB" c where "ID" = <ID Identified from the first select statement>;

        5. Start Jira.

Once the above steps are performed, go back to "Project Settings > Knowledge base" and you should be able add a new link.



最終更新日: 2024 年 12 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.