# Unassigned shardsafter nodes restart

**URL:** https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978
**Category:** Elasticsearch
**Created:** [November 26, 2011, 9:41am UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978 "2011-11-26T09:41:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)
#### Post date: [November 26, 2011, 9:41am UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978/1 "2011-11-26T09:41:17Z")

</div>

Hello there!

While I was working with es, I've restarted my three nodes, but at my  
surprise, nine of the fifteen possible shards were not assigned to any  
node, and some of them are primary!!

I'v tried to restart mys nodes, close and open my index, the problem  
persists

How is it possible? and what is the impact of such behaviour on the index

Thanks

---

<div class="post-metadata">

### Author: ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)
#### Post date: [November 26, 2011, 10:07am UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978/2 "2011-11-26T10:07:16Z")

</div>

This is the result of the state request on my cluster:

curl -XGET [http://localhost:9200/\_cluster/state?pretty=true](http://localhost:9200/_cluster/state?pretty=true)

{  
"cluster\_name" : "elasticsearch1",  
"master\_node" : "FX95BNUWTku2RBUyCGxa7A",  
"blocks" : {  
},  
"nodes" : {  
"6QcLnpHPSxexaOGkl\_pmqQ" : {  
"name" : "Electro",  
"transport\_address" : "inet[/192.168.30.4:9302]",  
"attributes" : {  
"rack" : "rack314",  
"master" : "true"  
}  
},  
"lJxU5h1oSjekxQcE6pj6sQ" : {  
"name" : "Sepulchre",  
"transport\_address" : "inet[/192.168.30.4:9300]",  
"attributes" : {  
"rack" : "rack314",  
"master" : "true"  
}  
},  
"FX95BNUWTku2RBUyCGxa7A" : {  
"name" : "Pixie",  
"transport\_address" : "inet[/192.168.30.4:9301]",  
"attributes" : {  
"rack" : "rack314",  
"master" : "true"  
}  
}  
},  
"metadata" : {  
"templates" : {  
},  
"indices" : {  
"client1" : {  
"state" : "open",  
"settings" : {  
"index.analysis.filter.x-cama-search-stop.stopwords.4" : "finish",  
"index.analysis.filter.x-cama-search-stop.stopwords.5" : "french",  
"index.analysis.filter.x-cama-search-stop.stopwords.6" : "german",  
"index.analysis.filter.x-cama-search-stop.stopwords.7" : "greek",  
"index.analysis.filter.x-cama-search-stop.stopwords.0" : "arabic",  
"index.analysis.analyzer.x-cama-search-uri-analyzer.pattern" :  
"\W+",  
"index.number\_of\_replicas" : "2",  
"index.analysis.filter.x-cama-search-stop.stopwords.1" :  
"dansish",  
"index.analysis.filter.x-cama-search-stop.stopwords.2" : "dutch",  
"index.analysis.filter.x-cama-search-stop.stopwords.3" :  
"english",  
"index.analysis.analyzer.x-cama-search-default-analyzer.type" :  
"custom",  
"index.analysis.filter.x-cama-search-stemmer.language" :  
"english",  
"index.analysis.filter.x-cama-search-stemmer.type" : "stemmer",  
"index.analysis.filter.x-cama-search-stop.stopwords.8" :  
"italian",  
"index.analysis.filter.x-cama-search-stop.stopwords.9" :  
"norwegian",  
"index.analysis.analyzer.x-cama-search-default-analyzer.filter.1"  
: "x-cama-search-stop",  
"index.analysis.analyzer.x-cama-search-default-analyzer.filter.0"  
: "x-cama-search-stemmer",  
"index.analysis.analyzer.x-cama-search-uri-analyzer.lowercase" :  
"true",  
"index.analysis.filter.x-cama-search-stop.type" : "stop",  
"index.analysis.filter.x-cama-search-stop.stopwords.10" :  
"portuguese",  
"index.analysis.filter.x-cama-search-stop.stopwords.11" :  
"russian",  
"index.analysis.filter.x-cama-search-stop.stopwords.12" :  
"spanish",  
"index.analysis.filter.x-cama-search-stop.stopwords.13" :  
"swedish",

"index.analysis.analyzer.x-cama-search-default-analyzer.tokenizer" :  
"standard",  
"index.analysis.analyzer.x-cama-search-uri-analyzer.type" :  
"pattern",  
"index.number\_of\_shards" : "5"  
},  
"mappings" : {  
"content" : {  
"\_id" : {  
"store" : "yes"  
},  
"\_index" : {  
"enabled" : true,  
"store" : "yes"  
},  
"properties" : {  
"content-type" : {  
"type" : "string"  
},  
"body" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-default-analyzer",  
"term\_vector" : "with\_positions\_offsets",  
"type" : "string"  
},  
"exportable" : {  
"type" : "string"  
},  
"uridigest" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"_default_" : {  
"store" : "yes",  
"type" : "string"  
},  
"entity" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"archivename" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"infected" : {  
"type" : "string"  
},  
"content-encoding" : {  
"type" : "string"  
},  
"reuri" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-uri-analyzer",  
"type" : "string"  
},  
"lang" : {  
"store" : "yes",  
"type" : "string"  
},  
"meta" : {  
"store" : "yes",  
"term\_vector" : "yes",  
"type" : "string"  
},  
"timestamp" : {  
"store" : "yes",  
"format" : "basicDate",  
"type" : "date"  
},  
"title" : {  
"type" : "string"  
},  
"sha1\_uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"primary" : {  
"type" : "string"  
},  
"x\_cama\_category" : {  
"type" : "string"  
},  
"page\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"year" : {  
"store" : "yes",  
"format" : "year",  
"type" : "date"  
},  
"crawl\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"key" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"x\_cama\_icon" : {  
"type" : "string"  
},  
"utc" : {  
"index" : "no",  
"store" : "yes",  
"format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
"type" : "date"  
},  
"uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"agent" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"size" : {  
"index" : "no",  
"store" : "yes",  
"type" : "long"  
},  
"lc4j" : {  
"type" : "string"  
},  
"class\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"seconds" : {  
"store" : "yes",  
"type" : "long"  
},  
"sha1\_body" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"content-length" : {  
"type" : "string"  
},  
"mime" : {  
"store" : "yes",  
"type" : "string"  
},  
"sha1\_uribody" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
}  
}  
},  
"all" : {  
"\_id" : {  
"store" : "yes"  
},  
"\_index" : {  
"enabled" : true,  
"store" : "yes"  
},  
"properties" : {  
"content-type" : {  
"type" : "string"  
},  
"body" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-default-analyzer",  
"term\_vector" : "with\_positions\_offsets",  
"type" : "string"  
},  
"exportable" : {  
"type" : "string"  
},  
"uridigest" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"_default_" : {  
"store" : "yes",  
"type" : "string"  
},  
"entity" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"archivename" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"infected" : {  
"type" : "string"  
},  
"content-encoding" : {  
"type" : "string"  
},  
"reuri" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-uri-analyzer",  
"type" : "string"  
},  
"lang" : {  
"store" : "yes",  
"type" : "string"  
},  
"meta" : {  
"store" : "yes",  
"term\_vector" : "yes",  
"type" : "string"  
},  
"timestamp" : {  
"store" : "yes",  
"format" : "basicDate",  
"type" : "date"  
},  
"title" : {  
"type" : "string"  
},  
"sha1\_uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"primary" : {  
"type" : "string"  
},  
"x\_cama\_category" : {  
"type" : "string"  
},  
"page\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"year" : {  
"store" : "yes",  
"format" : "year",  
"type" : "date"  
},  
"crawl\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"key" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"x\_cama\_icon" : {  
"type" : "string"  
},  
"utc" : {  
"index" : "no",  
"store" : "yes",  
"format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
"type" : "date"  
},  
"uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"agent" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"size" : {  
"index" : "no",  
"store" : "yes",  
"type" : "long"  
},  
"lc4j" : {  
"type" : "string"  
},  
"class\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"seconds" : {  
"store" : "yes",  
"type" : "long"  
},  
"sha1\_body" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"content-length" : {  
"type" : "string"  
},  
"mime" : {  
"store" : "yes",  
"type" : "string"  
},  
"sha1\_uribody" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
}  
}  
},  
"url" : {  
"\_id" : {  
"store" : "yes"  
},  
"\_index" : {  
"enabled" : true,  
"store" : "yes"  
},  
"properties" : {  
"content-type" : {  
"type" : "string"  
},  
"body" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-default-analyzer",  
"term\_vector" : "with\_positions\_offsets",  
"type" : "string"  
},  
"exportable" : {  
"type" : "string"  
},  
"uridigest" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"_default_" : {  
"store" : "yes",  
"type" : "string"  
},  
"entity" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"archivename" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"infected" : {  
"type" : "string"  
},  
"content-encoding" : {  
"type" : "string"  
},  
"reuri" : {  
"store" : "yes",  
"analyzer" : "x-cama-search-uri-analyzer",  
"type" : "string"  
},  
"lang" : {  
"store" : "yes",  
"type" : "string"  
},  
"meta" : {  
"store" : "yes",  
"term\_vector" : "yes",  
"type" : "string"  
},  
"timestamp" : {  
"store" : "yes",  
"format" : "basicDate",  
"type" : "date"  
},  
"title" : {  
"type" : "string"  
},  
"sha1\_uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"primary" : {  
"type" : "string"  
},  
"x\_cama\_category" : {  
"type" : "string"  
},  
"page\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"year" : {  
"store" : "yes",  
"format" : "year",  
"type" : "date"  
},  
"crawl\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"key" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"x\_cama\_icon" : {  
"type" : "string"  
},  
"utc" : {  
"index" : "no",  
"store" : "yes",  
"format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
"type" : "date"  
},  
"uri" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"agent" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"size" : {  
"index" : "no",  
"store" : "yes",  
"type" : "long"  
},  
"lc4j" : {  
"type" : "string"  
},  
"class\_id" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
},  
"seconds" : {  
"store" : "yes",  
"type" : "long"  
},  
"sha1\_body" : {  
"index" : "no",  
"store" : "yes",  
"type" : "string"  
},  
"content-length" : {  
"type" : "string"  
},  
"mime" : {  
"store" : "yes",  
"type" : "string"  
},  
"sha1\_uribody" : {  
"index" : "not\_analyzed",  
"store" : "yes",  
"type" : "string"  
}  
}  
}  
},  
"aliases" :   
}  
}  
},  
"routing\_table" : {  
"indices" : {  
"client1" : {  
"shards" : {  
"0" : [ {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
} ],  
"1" : [ {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
} ],  
"2" : [ {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
} ],  
"3" : [ {  
"state" : "STARTED",  
"primary" : false,  
"node" : "lJxU5h1oSjekxQcE6pj6sQ",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : true,  
"node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : false,  
"node" : "FX95BNUWTku2RBUyCGxa7A",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
} ],  
"4" : [ {  
"state" : "STARTED",  
"primary" : false,  
"node" : "lJxU5h1oSjekxQcE6pj6sQ",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : true,  
"node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : false,  
"node" : "FX95BNUWTku2RBUyCGxa7A",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
} ]  
}  
}  
}  
},  
"routing\_nodes" : {  
"unassigned" : [ {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 0,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 1,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : false,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
}, {  
"state" : "UNASSIGNED",  
"primary" : true,  
"node" : null,  
"relocating\_node" : null,  
"shard" : 2,  
"index" : "client1"  
} ],  
"nodes" : {  
"lJxU5h1oSjekxQcE6pj6sQ" : [ {  
"state" : "STARTED",  
"primary" : false,  
"node" : "lJxU5h1oSjekxQcE6pj6sQ",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : false,  
"node" : "lJxU5h1oSjekxQcE6pj6sQ",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
} ],  
"6QcLnpHPSxexaOGkl\_pmqQ" : [ {  
"state" : "STARTED",  
"primary" : true,  
"node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : true,  
"node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
} ],  
"FX95BNUWTku2RBUyCGxa7A" : [ {  
"state" : "STARTED",  
"primary" : false,  
"node" : "FX95BNUWTku2RBUyCGxa7A",  
"relocating\_node" : null,  
"shard" : 3,  
"index" : "client1"  
}, {  
"state" : "STARTED",  
"primary" : false,  
"node" : "FX95BNUWTku2RBUyCGxa7A",  
"relocating\_node" : null,  
"shard" : 4,  
"index" : "client1"  
} ]  
}  
},  
"allocations" :   
}

On Sat, Nov 26, 2011 at 10:41 AM, Lyes zaiko [lyesjob@gmail.com](mailto:lyesjob@gmail.com) wrote:

> Hello there!
> 
> While I was working with es, I've restarted my three nodes, but at my  
> surprise, nine of the fifteen possible shards were not assigned to any  
> node, and some of them are primary!!
> 
> I'v tried to restart mys nodes, close and open my index, the problem  
> persists
> 
> How is it possible? and what is the impact of such behaviour on the index
> 
> 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: [November 27, 2011, 4:25pm UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978/3 "2011-11-27T16:25:47Z")

</div>

Hey,

If you want to know more regarding why certain shards are not allocated  
post full cluster restart, set gateway.local logging to TRACE, it will give  
more info (the logging for it will be done on the elected master node).

I see that you have 2 replicas for the index. This means 3 copies, and a  
shard will be "allocated" once it finds at least 2 pre restart copies among  
the nodes. This is controlled by the setting index.recovery.initial\_shards  
(which defaults to `quorum`). Try and set it to 1, maybe you restarted and  
it missed some data locations (the logging above will tell you). Btw, you  
can set this setting per index, and on a "running" cluster for an index  
that does not recover (possibly because copies are missing).

-shay.banon

On Sat, Nov 26, 2011 at 12:07 PM, Lyes zaiko [lyesjob@gmail.com](mailto:lyesjob@gmail.com) wrote:

> This is the result of the state request on my cluster:
> 
> curl -XGET [http://localhost:9200/\_cluster/state?pretty=true](http://localhost:9200/_cluster/state?pretty=true)
> 
> {  
> "cluster\_name" : "elasticsearch1",  
> "master\_node" : "FX95BNUWTku2RBUyCGxa7A",  
> "blocks" : {  
> },  
> "nodes" : {  
> "6QcLnpHPSxexaOGkl\_pmqQ" : {  
> "name" : "Electro",  
> "transport\_address" : "inet[/192.168.30.4:9302]",  
> "attributes" : {  
> "rack" : "rack314",  
> "master" : "true"  
> }  
> },  
> "lJxU5h1oSjekxQcE6pj6sQ" : {  
> "name" : "Sepulchre",  
> "transport\_address" : "inet[/192.168.30.4:9300]",  
> "attributes" : {  
> "rack" : "rack314",  
> "master" : "true"  
> }  
> },  
> "FX95BNUWTku2RBUyCGxa7A" : {  
> "name" : "Pixie",  
> "transport\_address" : "inet[/192.168.30.4:9301]",  
> "attributes" : {  
> "rack" : "rack314",  
> "master" : "true"  
> }  
> }  
> },  
> "metadata" : {  
> "templates" : {  
> },  
> "indices" : {  
> "client1" : {  
> "state" : "open",  
> "settings" : {  
> "index.analysis.filter.x-cama-search-stop.stopwords.4" :  
> "finish",  
> "index.analysis.filter.x-cama-search-stop.stopwords.5" :  
> "french",  
> "index.analysis.filter.x-cama-search-stop.stopwords.6" :  
> "german",  
> "index.analysis.filter.x-cama-search-stop.stopwords.7" : "greek",  
> "index.analysis.filter.x-cama-search-stop.stopwords.0" :  
> "arabic",  
> "index.analysis.analyzer.x-cama-search-uri-analyzer.pattern" :  
> "\W+",  
> "index.number\_of\_replicas" : "2",  
> "index.analysis.filter.x-cama-search-stop.stopwords.1" :  
> "dansish",  
> "index.analysis.filter.x-cama-search-stop.stopwords.2" : "dutch",  
> "index.analysis.filter.x-cama-search-stop.stopwords.3" :  
> "english",  
> "index.analysis.analyzer.x-cama-search-default-analyzer.type" :  
> "custom",  
> "index.analysis.filter.x-cama-search-stemmer.language" :  
> "english",  
> "index.analysis.filter.x-cama-search-stemmer.type" : "stemmer",  
> "index.analysis.filter.x-cama-search-stop.stopwords.8" :  
> "italian",  
> "index.analysis.filter.x-cama-search-stop.stopwords.9" :  
> "norwegian",
> 
> "index.analysis.analyzer.x-cama-search-default-analyzer.filter.1" :  
> "x-cama-search-stop",
> 
> "index.analysis.analyzer.x-cama-search-default-analyzer.filter.0" :  
> "x-cama-search-stemmer",  
> "index.analysis.analyzer.x-cama-search-uri-analyzer.lowercase" :  
> "true",  
> "index.analysis.filter.x-cama-search-stop.type" : "stop",  
> "index.analysis.filter.x-cama-search-stop.stopwords.10" :  
> "portuguese",  
> "index.analysis.filter.x-cama-search-stop.stopwords.11" :  
> "russian",  
> "index.analysis.filter.x-cama-search-stop.stopwords.12" :  
> "spanish",  
> "index.analysis.filter.x-cama-search-stop.stopwords.13" :  
> "swedish",
> 
> "index.analysis.analyzer.x-cama-search-default-analyzer.tokenizer" :  
> "standard",  
> "index.analysis.analyzer.x-cama-search-uri-analyzer.type" :  
> "pattern",  
> "index.number\_of\_shards" : "5"  
> },  
> "mappings" : {  
> "content" : {  
> "\_id" : {  
> "store" : "yes"  
> },  
> "\_index" : {  
> "enabled" : true,  
> "store" : "yes"  
> },  
> "properties" : {  
> "content-type" : {  
> "type" : "string"  
> },  
> "body" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-default-analyzer",  
> "term\_vector" : "with\_positions\_offsets",  
> "type" : "string"  
> },  
> "exportable" : {  
> "type" : "string"  
> },  
> "uridigest" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "_default_" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "entity" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "archivename" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "infected" : {  
> "type" : "string"  
> },  
> "content-encoding" : {  
> "type" : "string"  
> },  
> "reuri" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-uri-analyzer",  
> "type" : "string"  
> },  
> "lang" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "meta" : {  
> "store" : "yes",  
> "term\_vector" : "yes",  
> "type" : "string"  
> },  
> "timestamp" : {  
> "store" : "yes",  
> "format" : "basicDate",  
> "type" : "date"  
> },  
> "title" : {  
> "type" : "string"  
> },  
> "sha1\_uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "primary" : {  
> "type" : "string"  
> },  
> "x\_cama\_category" : {  
> "type" : "string"  
> },  
> "page\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "year" : {  
> "store" : "yes",  
> "format" : "year",  
> "type" : "date"  
> },  
> "crawl\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "key" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "x\_cama\_icon" : {  
> "type" : "string"  
> },  
> "utc" : {  
> "index" : "no",  
> "store" : "yes",  
> "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> "type" : "date"  
> },  
> "uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "agent" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "size" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "long"  
> },  
> "lc4j" : {  
> "type" : "string"  
> },  
> "class\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "seconds" : {  
> "store" : "yes",  
> "type" : "long"  
> },  
> "sha1\_body" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "content-length" : {  
> "type" : "string"  
> },  
> "mime" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "sha1\_uribody" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> }  
> }  
> },  
> "all" : {  
> "\_id" : {  
> "store" : "yes"  
> },  
> "\_index" : {  
> "enabled" : true,  
> "store" : "yes"  
> },  
> "properties" : {  
> "content-type" : {  
> "type" : "string"  
> },  
> "body" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-default-analyzer",  
> "term\_vector" : "with\_positions\_offsets",  
> "type" : "string"  
> },  
> "exportable" : {  
> "type" : "string"  
> },  
> "uridigest" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "_default_" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "entity" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "archivename" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "infected" : {  
> "type" : "string"  
> },  
> "content-encoding" : {  
> "type" : "string"  
> },  
> "reuri" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-uri-analyzer",  
> "type" : "string"  
> },  
> "lang" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "meta" : {  
> "store" : "yes",  
> "term\_vector" : "yes",  
> "type" : "string"  
> },  
> "timestamp" : {  
> "store" : "yes",  
> "format" : "basicDate",  
> "type" : "date"  
> },  
> "title" : {  
> "type" : "string"  
> },  
> "sha1\_uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "primary" : {  
> "type" : "string"  
> },  
> "x\_cama\_category" : {  
> "type" : "string"  
> },  
> "page\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "year" : {  
> "store" : "yes",  
> "format" : "year",  
> "type" : "date"  
> },  
> "crawl\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "key" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "x\_cama\_icon" : {  
> "type" : "string"  
> },  
> "utc" : {  
> "index" : "no",  
> "store" : "yes",  
> "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> "type" : "date"  
> },  
> "uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "agent" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "size" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "long"  
> },  
> "lc4j" : {  
> "type" : "string"  
> },  
> "class\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "seconds" : {  
> "store" : "yes",  
> "type" : "long"  
> },  
> "sha1\_body" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "content-length" : {  
> "type" : "string"  
> },  
> "mime" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "sha1\_uribody" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> }  
> }  
> },  
> "url" : {  
> "\_id" : {  
> "store" : "yes"  
> },  
> "\_index" : {  
> "enabled" : true,  
> "store" : "yes"  
> },  
> "properties" : {  
> "content-type" : {  
> "type" : "string"  
> },  
> "body" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-default-analyzer",  
> "term\_vector" : "with\_positions\_offsets",  
> "type" : "string"  
> },  
> "exportable" : {  
> "type" : "string"  
> },  
> "uridigest" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "_default_" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "entity" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "archivename" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "infected" : {  
> "type" : "string"  
> },  
> "content-encoding" : {  
> "type" : "string"  
> },  
> "reuri" : {  
> "store" : "yes",  
> "analyzer" : "x-cama-search-uri-analyzer",  
> "type" : "string"  
> },  
> "lang" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "meta" : {  
> "store" : "yes",  
> "term\_vector" : "yes",  
> "type" : "string"  
> },  
> "timestamp" : {  
> "store" : "yes",  
> "format" : "basicDate",  
> "type" : "date"  
> },  
> "title" : {  
> "type" : "string"  
> },  
> "sha1\_uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "primary" : {  
> "type" : "string"  
> },  
> "x\_cama\_category" : {  
> "type" : "string"  
> },  
> "page\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "year" : {  
> "store" : "yes",  
> "format" : "year",  
> "type" : "date"  
> },  
> "crawl\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "key" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "x\_cama\_icon" : {  
> "type" : "string"  
> },  
> "utc" : {  
> "index" : "no",  
> "store" : "yes",  
> "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> "type" : "date"  
> },  
> "uri" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "agent" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "size" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "long"  
> },  
> "lc4j" : {  
> "type" : "string"  
> },  
> "class\_id" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "seconds" : {  
> "store" : "yes",  
> "type" : "long"  
> },  
> "sha1\_body" : {  
> "index" : "no",  
> "store" : "yes",  
> "type" : "string"  
> },  
> "content-length" : {  
> "type" : "string"  
> },  
> "mime" : {  
> "store" : "yes",  
> "type" : "string"  
> },  
> "sha1\_uribody" : {  
> "index" : "not\_analyzed",  
> "store" : "yes",  
> "type" : "string"  
> }  
> }  
> }  
> },  
> "aliases" :   
> }  
> }  
> },  
> "routing\_table" : {  
> "indices" : {  
> "client1" : {  
> "shards" : {  
> "0" : [ {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> } ],  
> "1" : [ {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> } ],  
> "2" : [ {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> } ],  
> "3" : [ {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : true,  
> "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "FX95BNUWTku2RBUyCGxa7A",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> } ],  
> "4" : [ {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : true,  
> "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "FX95BNUWTku2RBUyCGxa7A",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> } ]  
> }  
> }  
> }  
> },  
> "routing\_nodes" : {  
> "unassigned" : [ {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 0,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 1,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : false,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> }, {  
> "state" : "UNASSIGNED",  
> "primary" : true,  
> "node" : null,  
> "relocating\_node" : null,  
> "shard" : 2,  
> "index" : "client1"  
> } ],  
> "nodes" : {  
> "lJxU5h1oSjekxQcE6pj6sQ" : [ {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> } ],  
> "6QcLnpHPSxexaOGkl\_pmqQ" : [ {  
> "state" : "STARTED",  
> "primary" : true,  
> "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : true,  
> "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> } ],  
> "FX95BNUWTku2RBUyCGxa7A" : [ {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "FX95BNUWTku2RBUyCGxa7A",  
> "relocating\_node" : null,  
> "shard" : 3,  
> "index" : "client1"  
> }, {  
> "state" : "STARTED",  
> "primary" : false,  
> "node" : "FX95BNUWTku2RBUyCGxa7A",  
> "relocating\_node" : null,  
> "shard" : 4,  
> "index" : "client1"  
> } ]  
> }  
> },  
> "allocations" :   
> }
> 
> On Sat, Nov 26, 2011 at 10:41 AM, Lyes zaiko [lyesjob@gmail.com](mailto:lyesjob@gmail.com) wrote:
> 
> > Hello there!
> > 
> > While I was working with es, I've restarted my three nodes, but at my  
> > surprise, nine of the fifteen possible shards were not assigned to any  
> > node, and some of them are primary!!
> > 
> > I'v tried to restart mys nodes, close and open my index, the problem  
> > persists
> > 
> > How is it possible? and what is the impact of such behaviour on the index
> > 
> > Thanks

---

<div class="post-metadata">

### Author: ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)
#### Post date: [November 28, 2011, 7:12am UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978/4 "2011-11-28T07:12:20Z")

</div>

Thank Shay for the clarifications, I must admit that I still have leaks in  
es configuration, it is time for me to read more about that.

On Sun, Nov 27, 2011 at 5:25 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Hey,
> 
> If you want to know more regarding why certain shards are not allocated  
> post full cluster restart, set gateway.local logging to TRACE, it will give  
> more info (the logging for it will be done on the elected master node).
> 
> I see that you have 2 replicas for the index. This means 3 copies, and a  
> shard will be "allocated" once it finds at least 2 pre restart copies among  
> the nodes. This is controlled by the setting index.recovery.initial\_shards  
> (which defaults to `quorum`). Try and set it to 1, maybe you restarted and  
> it missed some data locations (the logging above will tell you). Btw, you  
> can set this setting per index, and on a "running" cluster for an index  
> that does not recover (possibly because copies are missing).
> 
> -shay.banon
> 
> On Sat, Nov 26, 2011 at 12:07 PM, Lyes zaiko [lyesjob@gmail.com](mailto:lyesjob@gmail.com) wrote:
> 
> > This is the result of the state request on my cluster:
> > 
> > curl -XGET [http://localhost:9200/\_cluster/state?pretty=true](http://localhost:9200/_cluster/state?pretty=true)
> > 
> > {  
> > "cluster\_name" : "elasticsearch1",  
> > "master\_node" : "FX95BNUWTku2RBUyCGxa7A",  
> > "blocks" : {  
> > },  
> > "nodes" : {  
> > "6QcLnpHPSxexaOGkl\_pmqQ" : {  
> > "name" : "Electro",  
> > "transport\_address" : "inet[/192.168.30.4:9302]",  
> > "attributes" : {  
> > "rack" : "rack314",  
> > "master" : "true"  
> > }  
> > },  
> > "lJxU5h1oSjekxQcE6pj6sQ" : {  
> > "name" : "Sepulchre",  
> > "transport\_address" : "inet[/192.168.30.4:9300]",  
> > "attributes" : {  
> > "rack" : "rack314",  
> > "master" : "true"  
> > }  
> > },  
> > "FX95BNUWTku2RBUyCGxa7A" : {  
> > "name" : "Pixie",  
> > "transport\_address" : "inet[/192.168.30.4:9301]",  
> > "attributes" : {  
> > "rack" : "rack314",  
> > "master" : "true"  
> > }  
> > }  
> > },  
> > "metadata" : {  
> > "templates" : {  
> > },  
> > "indices" : {  
> > "client1" : {  
> > "state" : "open",  
> > "settings" : {  
> > "index.analysis.filter.x-cama-search-stop.stopwords.4" :  
> > "finish",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.5" :  
> > "french",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.6" :  
> > "german",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.7" :  
> > "greek",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.0" :  
> > "arabic",  
> > "index.analysis.analyzer.x-cama-search-uri-analyzer.pattern" :  
> > "\W+",  
> > "index.number\_of\_replicas" : "2",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.1" :  
> > "dansish",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.2" :  
> > "dutch",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.3" :  
> > "english",  
> > "index.analysis.analyzer.x-cama-search-default-analyzer.type" :  
> > "custom",  
> > "index.analysis.filter.x-cama-search-stemmer.language" :  
> > "english",  
> > "index.analysis.filter.x-cama-search-stemmer.type" : "stemmer",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.8" :  
> > "italian",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.9" :  
> > "norwegian",
> > 
> > "index.analysis.analyzer.x-cama-search-default-analyzer.filter.1" :  
> > "x-cama-search-stop",
> > 
> > "index.analysis.analyzer.x-cama-search-default-analyzer.filter.0" :  
> > "x-cama-search-stemmer",  
> > "index.analysis.analyzer.x-cama-search-uri-analyzer.lowercase"  
> > : "true",  
> > "index.analysis.filter.x-cama-search-stop.type" : "stop",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.10" :  
> > "portuguese",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.11" :  
> > "russian",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.12" :  
> > "spanish",  
> > "index.analysis.filter.x-cama-search-stop.stopwords.13" :  
> > "swedish",
> > 
> > "index.analysis.analyzer.x-cama-search-default-analyzer.tokenizer" :  
> > "standard",  
> > "index.analysis.analyzer.x-cama-search-uri-analyzer.type" :  
> > "pattern",  
> > "index.number\_of\_shards" : "5"  
> > },  
> > "mappings" : {  
> > "content" : {  
> > "\_id" : {  
> > "store" : "yes"  
> > },  
> > "\_index" : {  
> > "enabled" : true,  
> > "store" : "yes"  
> > },  
> > "properties" : {  
> > "content-type" : {  
> > "type" : "string"  
> > },  
> > "body" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-default-analyzer",  
> > "term\_vector" : "with\_positions\_offsets",  
> > "type" : "string"  
> > },  
> > "exportable" : {  
> > "type" : "string"  
> > },  
> > "uridigest" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "_default_" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "entity" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "archivename" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "infected" : {  
> > "type" : "string"  
> > },  
> > "content-encoding" : {  
> > "type" : "string"  
> > },  
> > "reuri" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-uri-analyzer",  
> > "type" : "string"  
> > },  
> > "lang" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "meta" : {  
> > "store" : "yes",  
> > "term\_vector" : "yes",  
> > "type" : "string"  
> > },  
> > "timestamp" : {  
> > "store" : "yes",  
> > "format" : "basicDate",  
> > "type" : "date"  
> > },  
> > "title" : {  
> > "type" : "string"  
> > },  
> > "sha1\_uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "primary" : {  
> > "type" : "string"  
> > },  
> > "x\_cama\_category" : {  
> > "type" : "string"  
> > },  
> > "page\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "year" : {  
> > "store" : "yes",  
> > "format" : "year",  
> > "type" : "date"  
> > },  
> > "crawl\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "key" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "x\_cama\_icon" : {  
> > "type" : "string"  
> > },  
> > "utc" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> > "type" : "date"  
> > },  
> > "uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "agent" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "size" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "lc4j" : {  
> > "type" : "string"  
> > },  
> > "class\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "seconds" : {  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "sha1\_body" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "content-length" : {  
> > "type" : "string"  
> > },  
> > "mime" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "sha1\_uribody" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > }  
> > }  
> > },  
> > "all" : {  
> > "\_id" : {  
> > "store" : "yes"  
> > },  
> > "\_index" : {  
> > "enabled" : true,  
> > "store" : "yes"  
> > },  
> > "properties" : {  
> > "content-type" : {  
> > "type" : "string"  
> > },  
> > "body" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-default-analyzer",  
> > "term\_vector" : "with\_positions\_offsets",  
> > "type" : "string"  
> > },  
> > "exportable" : {  
> > "type" : "string"  
> > },  
> > "uridigest" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "_default_" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "entity" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "archivename" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "infected" : {  
> > "type" : "string"  
> > },  
> > "content-encoding" : {  
> > "type" : "string"  
> > },  
> > "reuri" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-uri-analyzer",  
> > "type" : "string"  
> > },  
> > "lang" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "meta" : {  
> > "store" : "yes",  
> > "term\_vector" : "yes",  
> > "type" : "string"  
> > },  
> > "timestamp" : {  
> > "store" : "yes",  
> > "format" : "basicDate",  
> > "type" : "date"  
> > },  
> > "title" : {  
> > "type" : "string"  
> > },  
> > "sha1\_uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "primary" : {  
> > "type" : "string"  
> > },  
> > "x\_cama\_category" : {  
> > "type" : "string"  
> > },  
> > "page\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "year" : {  
> > "store" : "yes",  
> > "format" : "year",  
> > "type" : "date"  
> > },  
> > "crawl\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "key" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "x\_cama\_icon" : {  
> > "type" : "string"  
> > },  
> > "utc" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> > "type" : "date"  
> > },  
> > "uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "agent" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "size" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "lc4j" : {  
> > "type" : "string"  
> > },  
> > "class\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "seconds" : {  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "sha1\_body" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "content-length" : {  
> > "type" : "string"  
> > },  
> > "mime" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "sha1\_uribody" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > }  
> > }  
> > },  
> > "url" : {  
> > "\_id" : {  
> > "store" : "yes"  
> > },  
> > "\_index" : {  
> > "enabled" : true,  
> > "store" : "yes"  
> > },  
> > "properties" : {  
> > "content-type" : {  
> > "type" : "string"  
> > },  
> > "body" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-default-analyzer",  
> > "term\_vector" : "with\_positions\_offsets",  
> > "type" : "string"  
> > },  
> > "exportable" : {  
> > "type" : "string"  
> > },  
> > "uridigest" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "_default_" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "entity" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "archivename" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "infected" : {  
> > "type" : "string"  
> > },  
> > "content-encoding" : {  
> > "type" : "string"  
> > },  
> > "reuri" : {  
> > "store" : "yes",  
> > "analyzer" : "x-cama-search-uri-analyzer",  
> > "type" : "string"  
> > },  
> > "lang" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "meta" : {  
> > "store" : "yes",  
> > "term\_vector" : "yes",  
> > "type" : "string"  
> > },  
> > "timestamp" : {  
> > "store" : "yes",  
> > "format" : "basicDate",  
> > "type" : "date"  
> > },  
> > "title" : {  
> > "type" : "string"  
> > },  
> > "sha1\_uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "primary" : {  
> > "type" : "string"  
> > },  
> > "x\_cama\_category" : {  
> > "type" : "string"  
> > },  
> > "page\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "year" : {  
> > "store" : "yes",  
> > "format" : "year",  
> > "type" : "date"  
> > },  
> > "crawl\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "key" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "x\_cama\_icon" : {  
> > "type" : "string"  
> > },  
> > "utc" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "format" : "YYYY-MM-dd'T'HH:mm:ss'Z'",  
> > "type" : "date"  
> > },  
> > "uri" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "agent" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "size" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "lc4j" : {  
> > "type" : "string"  
> > },  
> > "class\_id" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "seconds" : {  
> > "store" : "yes",  
> > "type" : "long"  
> > },  
> > "sha1\_body" : {  
> > "index" : "no",  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "content-length" : {  
> > "type" : "string"  
> > },  
> > "mime" : {  
> > "store" : "yes",  
> > "type" : "string"  
> > },  
> > "sha1\_uribody" : {  
> > "index" : "not\_analyzed",  
> > "store" : "yes",  
> > "type" : "string"  
> > }  
> > }  
> > }  
> > },  
> > "aliases" :   
> > }  
> > }  
> > },  
> > "routing\_table" : {  
> > "indices" : {  
> > "client1" : {  
> > "shards" : {  
> > "0" : [ {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > } ],  
> > "1" : [ {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > } ],  
> > "2" : [ {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > } ],  
> > "3" : [ {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : true,  
> > "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "FX95BNUWTku2RBUyCGxa7A",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > } ],  
> > "4" : [ {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : true,  
> > "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "FX95BNUWTku2RBUyCGxa7A",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > } ]  
> > }  
> > }  
> > }  
> > },  
> > "routing\_nodes" : {  
> > "unassigned" : [ {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 0,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 1,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : false,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > }, {  
> > "state" : "UNASSIGNED",  
> > "primary" : true,  
> > "node" : null,  
> > "relocating\_node" : null,  
> > "shard" : 2,  
> > "index" : "client1"  
> > } ],  
> > "nodes" : {  
> > "lJxU5h1oSjekxQcE6pj6sQ" : [ {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "lJxU5h1oSjekxQcE6pj6sQ",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > } ],  
> > "6QcLnpHPSxexaOGkl\_pmqQ" : [ {  
> > "state" : "STARTED",  
> > "primary" : true,  
> > "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : true,  
> > "node" : "6QcLnpHPSxexaOGkl\_pmqQ",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > } ],  
> > "FX95BNUWTku2RBUyCGxa7A" : [ {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "FX95BNUWTku2RBUyCGxa7A",  
> > "relocating\_node" : null,  
> > "shard" : 3,  
> > "index" : "client1"  
> > }, {  
> > "state" : "STARTED",  
> > "primary" : false,  
> > "node" : "FX95BNUWTku2RBUyCGxa7A",  
> > "relocating\_node" : null,  
> > "shard" : 4,  
> > "index" : "client1"  
> > } ]  
> > }  
> > },  
> > "allocations" :   
> > }
> > 
> > On Sat, Nov 26, 2011 at 10:41 AM, Lyes zaiko [lyesjob@gmail.com](mailto:lyesjob@gmail.com) wrote:
> > 
> > > Hello there!
> > > 
> > > While I was working with es, I've restarted my three nodes, but at my  
> > > surprise, nine of the fifteen possible shards were not assigned to any  
> > > node, and some of them are primary!!
> > > 
> > > I'v tried to restart mys nodes, close and open my index, the problem  
> > > persists
> > > 
> > > How is it possible? and what is the impact of such behaviour on the index
> > > 
> > > 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, 3:47am UTC](https://discuss.elastic.co/t/unassigned-shardsafter-nodes-restart/5978/5 "2017-07-06T03:47:23Z")

</div>


