When trying to create an issue Jira produces an error stating: "cannot change DocValues type from SORTED for field"

お困りですか?

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

コミュニティに質問


プラットフォームについて: 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 は除く

要約

This error can be related with two different problems on Jira when attempting to create an issue:

  • Jira is unable to create issues and after spinning for a short while user is presented with:

We can’t create this issue for you right now, it could be due to unsupported content you’ve entered into one or more of the issue fields. If this situation persists, contact your administrator as they’ll be able to access more specific information in the log file.

  • After deleting a Project it is still visible under Projects list

診断

For the first scenario (attempting to create Issues), one or more of the following error messages can be observed in the atlassian-jira log:

2021-04-12 05:20:04,431-0400 http-nio-8080-exec-9 url:/jira/secure/AssignIssue.jspa username:ss25631 WARN ss25631 319x5146x1 i9six0 10.237.85.95,10.237.54.112 /secure/AssignIssue.jspa [c.a.jira.index.AccumulatingResultBuilder] cannot change DocValues type from SORTED to NUMERIC for field "sort_customfield_23002"
2021-04-14 12:30:16,640-0400 JiraTaskExecutionThread-3 WARN anonymous     [c.a.jira.index.AccumulatingResultBuilder] Indexing failed for Issue - '350757'
2021-04-14 12:30:16,640-0400 JiraTaskExecutionThread-3 WARN anonymous     [c.a.jira.index.AccumulatingResultBuilder] cannot change DocValues type from SORTED to NUMERIC for field "sort_customfield_23002"
2021-04-14 15:43:42,697-0400 http-nio-8081-exec-24 url:/jira/secure/QuickCreateIssue.jspa username:xxxxxxxx WARN xxxxxxxx 943x367x1 ev3wp2 10.108.46.19 /secure/QuickCreateIssue.jspa [c.a.jira.index.AccumulatingResultBuilder] cannot change DocValues type from SORTED to SORTED_SET for field "customfield_23104"
java.lang.IllegalArgumentException: cannot change DocValues type from SORTED to SORTED_SET for field "customfield_23104"
...ommitted...
2021-04-14 15:43:42,709-0400 http-nio-8081-exec-24 url:/jira/secure/QuickCreateIssue.jspa username:xxxxxxx ERROR xxxxxxxx 943x367x1 ev3wp2 10.108.46.19 /secure/QuickCreateIssue.jspa [c.a.j.bc.issue.DefaultIssueService] Error creating issue:
com.atlassian.jira.exception.CreateException: Indexing completed with 1 errors

For the second scenario (attempting to delete a project), the following messages are observed within the atlassian-jira.log: 

2022-07-26 08:51:04,248-0400 ajp-nio-0.0.0.0-8069-exec-9 WARN user1 531x7764x2 1j5t1yx 10.147.54.147 /secure/project/DeleteProject!default.jspa [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'Project XYZ'
2022-07-26 08:51:06,026-0400 JiraTaskExecutionThread-3 INFO user1 531x7789x1 1j5t1yx 10.147.54.147 /secure/project/DeleteProject.jspa [c.a.c.e.c.a.j.permission.WorkflowBasedPermissionSchemeManager.projectSchemeCache] Cache com.atlassian.jira.permission.WorkflowBasedPermissionSchemeManager.projectSchemeCache was flushed
2022-07-26 08:51:06,075-0400 JiraTaskExecutionThread-3 WARN user1 531x7789x1 1j5t1yx 10.147.54.147 /secure/project/DeleteProject.jspa [c.a.jira.index.AccumulatingResultBuilder] Indexing failed for Issue - '1290986'
2022-07-26 08:51:06,075-0400 JiraTaskExecutionThread-3 WARN user1 531x7789x1 1j5t1yx 10.147.54.147 /secure/project/DeleteProject.jspa [c.a.jira.index.AccumulatingResultBuilder] cannot change DocValues type from NUMERIC to SORTED for field "sort_customfield_24100"
java.lang.IllegalArgumentException: cannot change DocValues type from NUMERIC to SORTED for field "sort_customfield_24100"


原因

The root cause of this error is still unknown. Some reports from other 3rd party plugins indicate that the cause might be related to Lucene’s (Jira search engine) conversion errors with huge volume of data (the bigger your instance the more likely you will encounter this error).

 Elements connect - jira-upgrade-indexation-errors-on-jira-8-cannot-change-docvalues-type-from-sorted-to-sorted_set-for-field

ソリューション

As with all recommendations made by Atlassian Support, please follow best practices for Change Management and test and validate these settings in a Test/Development and Staging environment prior to rolling any changes into a Production environment.

1. Determine what field is causing the problem. From the example above, the custom field ID is 23002:

2021-04-14 12:30:16,640-0400 JiraTaskExecutionThread-3 WARN anonymous     [c.a.jira.index.AccumulatingResultBuilder] cannot change DocValues type from SORTED to NUMERIC for field "sort_customfield_23002"

2. Query the database to find the Custom Field name:

select id,cfname from customfield where id=23002;

3. Disable the Search Template by setting it to None for the affected custom field. Steps can be found here: Editing Custom Fields - Search Template

Optional: You can test creating an issue at this point to ensure this is the cause.

4. Run a full re-index for Jira.

5. Enable the Search Template by setting it back to its previous value.


最終更新日: 2023 年 1 月 10 日

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

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