Getting "Something went wrong" error while accessing Assets object type or searching for objects
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
When a user is trying to access Assets object type and list objects, or search for objects via AQL query, the following error is shown on the browser page:
"Something went wrong. Contact administrator"
Environment
- Jira Service Management 5.x (single server or Data Center)
- Standalone Insight 10.x
Diagnosis
The following error appears in atlassian-jira.log file, on the corresponding Jira node:
- When visiting object types or objects:
2023-11-16 12:04:22,218+0000 http-nio-127.0.0.1-8080-exec-12 url: /jira/rest/insight/1.0/object/navlist; user: admin ERROR admin 724x123288x1 m23aao 192.168.1.5,127.0.0.1 /rest/insight/1.0/object/navlist [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:2055)
at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3989)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4950)
at io.riada.insight.index.model.InsightIndexBase.load(InsightIndexBase.java:70)
at io.riada.insight.index.model.ObjectIndexImpl.loadObjects(ObjectIndexImpl.java:156)
at com.riadalabs.jira.plugins.insight.services.core.ObjectFilterManagerImpl.filterObjectBeansInThread(ObjectFilterManagerImpl.kt:123)
at com.riadalabs.jira.plugins.insight.services.core.ObjectFilterManagerImpl.findObjectsBasedOnFilter(ObjectFilterManagerImpl.kt:84)
at com.riadalabs.jira.plugins.insight.services.core.ObjectFilterManagerImpl.findObjectsByFilter(ObjectFilterManagerImpl.kt:62)
at ...
- When searching objects with AQL:
2024-01-08 10:21:33,387+0100 http-nio-9595-exec-24 url: /rest/insight-am/1/search; user: admin ERROR admin 621x4863182x2 885vh0 192.168.1.50,192.168.1.40 /rest/insight-am/1/search [c.r.j.p.i.services.util.ServiceUtil] RuntimeException:java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
...
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
Cause
The object list is trying to fetch results from the index, but it is reporting an "IndexOutOfBounds" error. This is usually related to a corrupted index on the disk. In many cases, reindexing in UI will not help, but index files need to be purged and recreated manually, on each Jira node within the Data Center cluster.
Solution
Purge and recreate the index files as follows:
- Stop Jira on the node where the error got logged
- Delete the files for the local Assets index (content of $JIRA_HOME/caches/insight_indexes folder, no need to delete the folder itself)
- Start Jira
- Wait for the node to start up
- Repeat steps 1 - 4 on all other cluster nodes