Editing a page fails with a 500 error
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
users are unable to edit some pages with an exception.
環境
- Confluence 8.5
- External Links on page
- PostgreSQL
診断
In the atlassian-confluence.log, the exception logs when editing the page:
2024-02-22 12:36:39,661 ERROR [https-jsse-nio2-8090-exec-90 url: /rest/tinymce/1/drafts; user:admin] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
-- url: /rest/tinymce/1/drafts | userName: | referer: https://localhost:8090/pages/resumedraft.action?draftId=10001&draftShareId= | traceId: 3309c94855b1b652
org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [XX002]; error code [0]; could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement
Caused by: org.postgresql.util.PSQLException: ERROR: table tid from new index tuple (3902,10) overlaps with invalid duplicate tuple at offset 50 of block 95 in index "l_destpgtitle_idx"
Error points to a database side:
JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [XX002]; error code [0]
index for l_destpgtitle_idx
Caused by: org.postgresql.util.PSQLException: ERROR: table tid from new index tuple (3902,10) overlaps with invalid duplicate tuple at offset 50 of block 95 in index "l_destpgtitle_idx"
links table is associated to the l_destpgtitle_idx
conf854=# \d+ links
Table "public.links"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
------------------{}+{}-------------------------{}{}-------{}{}------{}{}-----{}{}------{}{}----------{}{}-----------
linkid | bigint | | not null | | plain | |
destpagetitle | character varying(255) | | | | extended | |
lowerdestpagetitle | character varying(255) | | | | extended | |
destspacekey | character varying(255) | | not null | | extended | |
lowerdestspacekey | character varying(255) | | | | extended | |
contentid | bigint | | not null | | plain | |
creator | character varying(255) | | | | extended | |
creationdate | timestamp without time zone | | | | plain | |
lastmodifier | character varying(255) | | | | extended | |
lastmoddate | timestamp without time zone | | | | plain | |
Indexes:
"links_pkey" PRIMARY KEY, btree (linkid)
"l_contentid_idx" btree (contentid)
"l_destspacekey_idx" btree (destspacekey)
"l_ldestpgtitle_idx" btree (lowerdestpagetitle)
"l_ldestspacekey_idx" btree (lowerdestspacekey)
"links_creator_idx" btree (creator)
"links_lastmodifier_idx" btree (lastmodifier)
Remove the links from the affected page and attempt to edit the page.
If the page publishes the content, proceed to solution.
原因
Database base error is caused by a corrupt index. SQL state [XX002]; error code [0]
XX002 | index_corrupted |
Index highlights l_destpgtitle_idx in the links table.
ソリューション
Please contact the DBA or database export to index the links table or database.
Before making changes to the database, please back up your DB. Also, the admin will need to stop Confluence.
If the problem persists, contact Atlassian support.