When using bulk to input data during rolling restart elasticsearch, error happens,primary shard is not active Timeout: [1m]

3 hosts

keep bulk data into es during rolling restart,
my steps:
1.set "cluster.routing.allocation.enable": "none"
2._flush/synced(may not success)
3.restart a esnode;
4.set "cluster.routing.allocation.enable": "all"
5.waiting until the cluster status become green;
6.repeat 1~5 until all esnodes are restarted.

when some esnode stoped,some json response of bulk may be failed,the error is

primary shard is not active Timeout: [1m], request: [BulkShardRequest [[myindex-002][3]] containing [198] requests]","type":"unavailable_shards_exception"},"status":503

I consider that when a esnode is shutdown,primary shards on it will soon transfer to the corresponding replica, which means,primary shard become replica, replica become primary shard.
And I tested ,shutdown a esnode when not bulking , the transfer happens in a moment.

So,does anyone has some suggestion? thanks a lot.

Does all your indices have at least one replica configured? Can you see anything about cluster state updates timing out in the Elasticsearch logs, likely on the currently elected master node? How many indices and shards do you have in the cluster?

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