# Issue using reindex api on 6.2.3

**URL:** <https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 1:01pm UTC](https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202 "2018-10-26T13:01:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent\_Leseigneur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laurent_leseigneur/32/30470_2.png) [@Laurent\_Leseigneur](https://discuss.elastic.co/u/Laurent_Leseigneur)\
**Post date:** [October 26, 2018, 1:01pm UTC](https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202/1 "2018-10-26T13:01:18Z")

</div>

Hi, i get this stack while using \_reindex API to do a simple rename operation using java low level client on elastic 6.2.3 OSS in a docker container :

```auto
GET _reindex/?wait_for_completion=false
{
  "source": {
    "index": "foo-1"
  },
  "dest": {
    "index": "bar-1"
  }
}

```

the stack trace is

```auto
    [2018-10-26T12:50:37,399][WARN][o.e.i.r.TransportReindexAction] [VkMcoUb] giving up on search because it failed with a non-retryable exception
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
	at org.elasticsearch.action.search.SearchScrollAsyncAction.onShardFailure(SearchScrollAsyncAction.java:269) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.search.SearchScrollAsyncAction$1.onFailure(SearchScrollAsyncAction.java:202) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:527) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1098) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1191) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1175) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.TransportService$7.onFailure(TransportService.java:667) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:657) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: org.elasticsearch.transport.RemoteTransportException: [VkMcoUb][172.22.0.2:9300][indices:data/read/search[phase/query/scroll]]
Caused by: org.elasticsearch.search.SearchContextMissingException: No search context found for id [625]
	at org.elasticsearch.search.SearchService.findContext(SearchService.java:520) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:391) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.search.SearchTransportService$8.messageReceived(SearchTransportService.java:410) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.search.SearchTransportService$8.messageReceived(SearchTransportService.java:407) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:66) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:656) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:672) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.2.3.jar:6.2.3]
	... 5 more

```

What's wrong with my call ? this query run well using kibana, so is there any issue with java client ?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [October 26, 2018, 1:34pm UTC](https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202/2 "2018-10-26T13:34:47Z")

</div>

Please wrap snippets in ``` or discuss will eat the formatting.

These:

```auto
 Caused by: org.elasticsearch.transport.RemoteTransportException: [VkMcoUb][172.22.0.2:9300][indices:data/read/search[phase/query/scroll]]
 Caused by: org.elasticsearch.search.SearchContextMissingException: No search context found for id [625]

```

Make it look like one of the nodes that was servicing the scroll went down. When that happens the `_reindex` can't recover its process so it dies.

---

<div class="post-metadata">

**Author:** ![Laurent\_Leseigneur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laurent_leseigneur/32/30470_2.png) [@Laurent\_Leseigneur](https://discuss.elastic.co/u/Laurent_Leseigneur)\
**Post date:** [October 26, 2018, 1:50pm UTC](https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202/3 "2018-10-26T13:50:25Z")

</div>

yes, sorry, juste updated the post

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 23, 2018, 1:50pm UTC](https://discuss.elastic.co/t/issue-using-reindex-api-on-6-2-3/154202/4 "2018-11-23T13:50:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
