CSV import error: Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state

お困りですか?

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

コミュニティに質問


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

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

*Fisheye および Crucible は除く

要約

While performing an External System Import from a CSV file in Jira, the following error is encountered:
"Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state"


環境

All versions of Jira Software Datacenter


診断

シナリオ 1

The following ERROR message can be found by clicking the link below the error under What now?:
You can "download a detailed log" of this import. The error will appear similar to the example below:

2021-05-28 17:23:50,425 INFO - ------------------------------
2021-05-28 17:23:50,425 INFO - Finished Importing : Issues
2021-05-28 17:23:50,425 INFO - ------------------------------
2021-05-28 17:23:50,425 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
java.lang.IllegalArgumentException: expected one element but was: <com.atlassian.jira.issue.fields.config.FieldConfigSchemeImpl@5fcbbee4, com.atlassian.jira.issue.fields.config.FieldConfigSchemeImpl@e859a2e4>
	at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:316)
	at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:254)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.associateCustomFieldWithIssueType(CustomFieldsUtil.java:272)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.makeSureCustomFieldIsApplicableForIssue(CustomFieldsUtil.java:153)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importExternalCustomFields(DefaultJiraDataImporter.java:1264)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:911)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:798)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:414)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:533)
	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
	at java.lang.Thread.run(Thread.java:748)
2021-05-28 17:23:50,427 INFO - No issues need to be reindexed.

シナリオ 2

The following ERROR message can be found by clicking the link below the error under What now?:
You can "download a detailed log" of this import. The error will appear similar to the example below:

2022-03-09 20:28:41,832 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
com.atlassian.jira.index.IndexingFailureException: Indexing completed with 1 errors
	at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:189)
	at com.atlassian.jira.issue.index.DefaultIndexManager.obtain(DefaultIndexManager.java:896)
	at com.atlassian.jira.issue.index.DefaultIndexManager.await(DefaultIndexManager.java:876)
	at com.atlassian.jira.issue.index.DefaultIndexManager.executeWithIndexLock(DefaultIndexManager.java:863)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:651)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:630)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:614)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:459)

The keyword is IndexingFailureException, indicating the error was when trying to index the newly created issue(s).


原因

シナリオ 1

This issue is caused because a custom field in the target project has more than 1 context defined. The importer fails to import into the defined custom field, and instead creates a new instance of the custom field. Support for this functionality was requested as a Suggestion in JRASERVER-64595: Support importing into a custom field with multiple contexts / configuration schemes.

シナリオ 2

Jira's failing when indexing the newly created issues due to a possible index corruption.


ソリューション

(warning) Important Note: Despite the note "Data may be in an unstable state", the outcome of this problem is a failed import. It will NOT result in database instability. JRASERVER-72462 Data may be in an unstable state ERROR logging is alarming was raised for the error handling.

シナリオ 1

This problem can be avoiding by selecting "Don't map this field" during the "Map fields" step of the import for any custom fields that have more than 1 context defined. 

シナリオ 2

Reindex Jira (background if single-node or full lock & reindex if in a cluster) and try the CSV import again.



Last modified on Mar 14, 2022

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

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