# Org.elasticsearch.action.UnavailableShardsException

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-action-unavailableshardsexception/3752>\
**Category:** Elasticsearch\
**Created:** [January 7, 2011, 6:59am UTC](https://discuss.elastic.co/t/org-elasticsearch-action-unavailableshardsexception/3752 "2011-01-07T06:59:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheepu](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@cheepu](https://discuss.elastic.co/u/cheepu)\
**Post date:** [January 7, 2011, 6:59am UTC](https://discuss.elastic.co/t/org-elasticsearch-action-unavailableshardsexception/3752/1 "2011-01-07T06:59:00Z")

</div>

Hi,  
Before doing any configuration my example was eorking well.  
I configured my elasticsearch.yml as follows:

node:  
data: true  
index :  
number\_of\_shards : 3  
number\_of\_replicas : 2

I am getting the following error:

Exception in thread "main"  
org.elasticsearch.action.UnavailableShardsException: [\_river][0] [3]  
shardIt, [0] active : Timeout waiting for [1m],

request: index {[\_river][test][\_meta], source[{"type":"rabbitmq"}]}  
at

org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
$AsyncShardOperationAction$4.onTimeout(TransportS

hardReplicationOperationAction.java:401)  
at org.elasticsearch.cluster.service.InternalClusterService  
$NotifyTimeout.run(InternalClusterService.java:269)  
at org.elasticsearch.timer.TimerService$ThreadedTimerTask  
$1.run(TimerService.java:113)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:619)  
Java Result: 1

even after removing all the settings from the elasticsearch.yml file  
and restarting the server I am getting the same error.  
Does it persists the previous setting?  
And what may the reason for this error?

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 7, 2011, 2:06pm UTC](https://discuss.elastic.co/t/org-elasticsearch-action-unavailableshardsexception/3752/2 "2011-01-07T14:06:55Z")

</div>

Thats probably because you start a single node. If you set the  
number\_of\_replicas to 2, then after a full restart, the indices won't be  
recovered (in the default local gateway) because a quorom of shards have not  
been discovered yet (it will want to find 2 shards out of the 3 (1 + 2  
replica) ).

On Fri, Jan 7, 2011 at 8:59 AM, cheepu [cheeputech@gmail.com](mailto:cheeputech@gmail.com) wrote:

> Hi,  
> Before doing any configuration my example was eorking well.  
> I configured my elasticsearch.yml as follows:
> 
> node:  
> data: true  
> index :  
> number\_of\_shards : 3  
> number\_of\_replicas : 2
> 
> I am getting the following error:
> 
> Exception in thread "main"  
> org.elasticsearch.action.UnavailableShardsException: [\_river][0] [3]  
> shardIt, [0] active : Timeout waiting for [1m],
> 
> request: index {[\_river][test][\_meta], source[{"type":"rabbitmq"}]}  
> at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
> $AsyncShardOperationAction$4.onTimeout(TransportS
> 
> hardReplicationOperationAction.java:401)  
> at org.elasticsearch.cluster.service.InternalClusterService  
> $NotifyTimeout.run(InternalClusterService.java:269)  
> at org.elasticsearch.timer.TimerService$ThreadedTimerTask  
> $1.run(TimerService.java:113)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:886)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:619)  
> Java Result: 1
> 
> even after removing all the settings from the elasticsearch.yml file  
> and restarting the server I am getting the same error.  
> Does it persists the previous setting?  
> And what may the reason for this error?
> 
> Thanks

---

<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:** [July 6, 2017, 4:14am UTC](https://discuss.elastic.co/t/org-elasticsearch-action-unavailableshardsexception/3752/3 "2017-07-06T04:14:08Z")

</div>


