Unable to reach Assets fieldsdata from Jira queries and REST endpoint resulting in no search results for AQL queries
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
No results are returned by AQL queries to search for Assets Objects, and API calls searching with AQL likewise return no results. No error is reported, only that there were no results for the search. If you have multiple Jira nodes, some may be able to search successfully and some may not.
Environment
Observed in 9.4.18 but may occur in any environment with Assets enabled, especially if there are other applications such as security software that may scan or lock open files in Asset's indexing directory.
Diagnosis
Logs contain entries for Assets indexing exceptions and "out of bounds" messages such as the following:
1
2024-05-30 02:43:26,623+0000 http-nio-8080-exec-68 url: /rest/insight/1.0/object/8513611/referenceinfo; user: <user> ERROR 163x13348608x3 1iyqkpm 172.30.84.164,127.0.0.1 /rest/insight/1.0/object/8513611/referenceinfo [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request com.riadalabs.jira.plugins.insight.common.exception.RuntimeInsightException: InsightRuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0; nested exception is: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2086)
Performing a Clean Reindex for Assets does not restore searching ability, or restores it only partially with some objects or attributes still unable to be searched.
Objects still can be viewed on the node and their attribute values observed even while they cannot be searched. Nothing appears to be "missing" when viewed.
Cause
Assets may have an invalid index due to corrupt or locked files in its Assets index folder, jira-home/caches/insight_index/
. These files are preventing the index from being built and/or used properly, even after a restart. As Assets uses the index for all searches, this means that some searches cannot be completed successfully while the issue is happening.
Solution
Shut down Jira
Delete the contents of the /caches/insight_index directory (located in Jira's home directory)
Restart Jira. Assets will begin re-indexing on startup
Was this helpful?