I am using Elasicsearch 5.0.0 version.
I decided to use bulk api and also refresh=wait_for when running bulk insert.
My cluster has 3 nodes and it has green state.
I use java for bulk insert, during the insert the thread stuck and I get a warning messages in the log of the elastic for this index.
Looking at the shard state I can see it in RELOCATING state.
When I remove refresh=wait_for it works with no warning and the thread is finished successfully.
Another weird thing is that I see the index created, even when the thread is stuck.
Please help me to understand why the thread is stuck and I get those messages.
How I can debug this situation?
[2017-04-26T12:38:31,108][WARN ][o.e.i.s.IndexShard ] [node1] [indextest_499112] timed out waiting for relocation hand-off to complete
[2017-04-26T12:38:31,110][WARN ][o.e.i.e.Engine ] [node1] [indextest_499112] failed engine [timed out waiting for relocation hand-off to complete]
[2017-04-26T12:38:31,151][WARN ][o.e.i.c.IndicesClusterStateService] [node1] [[indextest_499112]] marking and sending shard failed due to [shard failure, reason [timed out waiting for relocation hand-off to complete]]