# Nexus Cleanup service was faild

**URL:** <https://community.sonatype.com/t/nexus-cleanup-service-was-faild/10830>\
**Category:** Sonatype Nexus Repository\
**Tags:** help, nexus-repository\
**Created:** [June 22, 2023, 11:50am UTC](https://community.sonatype.com/t/nexus-cleanup-service-was-faild/10830 "2023-06-22T11:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![724862897](https://avatars.discourse-cdn.com/v4/letter/7/439d5e/32.png) [@724862897](https://community.sonatype.com/u/724862897)\
**Post date:** [June 22, 2023, 11:50am UTC](https://community.sonatype.com/t/nexus-cleanup-service-was-faild/10830/1 "2023-06-22T11:50:30Z")

</div>

when I create a task for clean repository, running faild, the error as follows:

2023-06-22 15:22:57,828+0800 ERROR [quartz-3-thread-1] \*SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Failed to run task ‘Run repository cleanup’  
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: [58145017-4CB3D9D5-18033F18-58BC0C2A-50BA21BF][local[1]][indices:data/read/search[phase/query+fetch/scroll]]  
Caused by: org.elasticsearch.search.SearchContextMissingException: No search context found for id [356]  
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)
