Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.14.0, 3.15.1, 3.15.2, 3.16.1, 3.18.1, 3.19.0
-
Fix Version/s: 3.21.0
-
Story Points:3
-
Notability:2
Description
On three occasions now we've seen the repository cleanup tasks fail with an error like the one below. This seems to occur when the elasticsearch query takes too long to complete.
We've had users work around this by reducing the amount of components selected by the cleanup policy. But I think this points to a flaw in our code. If the machine that Nexus Repo is running on is slow, or the cleanup policy is selecting a large number of components it should cause the cleanup to run slowly, not fail entirely.
2019-01-18 12:20:26,371-0500 WARN [quartz-2-thread-20] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 080a3b05-ada1-45a0-91e1-8b715fbc3dc4 : 'Cleanup service' [repository.cleanup] execution failure
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.SearchScrollQueryAndFetchAsyncAction.onPhaseFailure(SearchScrollQueryAndFetchAsyncAction.java:155)
at org.elasticsearch.action.search.SearchScrollQueryAndFetchAsyncAction.access$300(SearchScrollQueryAndFetchAsyncAction.java:41)
at org.elasticsearch.action.search.SearchScrollQueryAndFetchAsyncAction$1.onFailure(SearchScrollQueryAndFetchAsyncAction.java:142)
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:874)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:852)
at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:389)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.transport.RemoteTransportException: [03BE0352-264E5695-7C25F189-A53EC373-372DEEDA][local[1]][indices:data/read/search[phase/query+fetch/scroll]]
Caused by: org.elasticsearch.search.SearchContextMissingException: No search context found for id [7]
at org.elasticsearch.search.SearchService.findContext(SearchService.java:626)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:553)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchScrollTransportHandler.messageReceived(SearchServiceTransportAction.java:416)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchScrollTransportHandler.messageReceived(SearchServiceTransportAction.java:413)
at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:77)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:378)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Attachments
Issue Links
- fixes
-
NEXUS-22837 Cleanup task stops processing all repositories if an error is thrown processing a single repository
-
- Closed
-
- relates
-
NEXUS-16917 QueryPhaseExecutionException: Result window is too large Thrown for Search API
-
- Open
-