Details
-
Type:
Bug
-
Status: New
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.28.1, 3.29.0, 3.29.1, 3.29.2
-
Fix Version/s: None
-
Component/s: REST
-
Labels:
-
Notability:3
Description
Requests that access the search REST API may started to fail with 500 status code and a no such index exception in the nexus.log.
For example:
request.log
10.10.181.114 - - [21/Nov/2020:00:03:24 +0800] "GET /nexus/service/rest/v1/search?name=example-ios-ofi-extension&q=4e2b514eda5&group=com.example.components.ios.dynamic HTTP/1.1" 500 - 129 15 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36" [qtp228194461-85721]
nexus.log
2020-11-21 00:03:24,610+0800 WARN [qtp228194461-85721] *UNKNOWN org.sonatype.nexus.siesta.internal.UnexpectedExceptionMapper - (ID b3b8a79d-da04-48f4-83d7-601e50c540ff) Unexpected exception: [9dd1b6e44101641491d9b3f6db6e44b8de7a5a95] IndexNotFoundException[no such index] org.elasticsearch.index.IndexNotFoundException: no such index at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:581) at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:133) at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:113) at org.elasticsearch.action.search.AbstractSearchAsyncAction.<init>(AbstractSearchAsyncAction.java:99) at org.elasticsearch.action.search.SearchQueryThenFetchAsyncAction.<init>(SearchQueryThenFetchAsyncAction.java:53) at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:93) at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:47) at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:149) at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:137) at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:85) at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:58) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56) at org.sonatype.nexus.repository.search.query.SearchQueryServiceImpl.executeSearch(SearchQueryServiceImpl.java:214) at org.sonatype.nexus.repository.search.query.SearchQueryServiceImpl.search(SearchQueryServiceImpl.java:160) at org.sonatype.nexus.repository.rest.internal.resources.SearchResource.search(SearchResource.java:142) at sun.reflect.GeneratedMethodAccessor602.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
Workaround
For the few customers that experienced this issue, the following steps helped resolve it after it started:
1. Stop NXRM
2. Move the existing corrupt \${karaf.data}/elasticsearch directory out of the way.
3. Start NXRM
4. Create and run a task "Repair - Rebuild repository search" on all repositories
5. Create and run a task "Repair Rebuild repository browse" on all repos
Expected
Diagnose and provide guidance to prevent the issue.
Attachments
Issue Links
- causes
-
NEXUS-27708 Able to create repository on blobstore that does not exist, causing NullPointerException
-
- Closed
-