# Create mapping error！——primary shard is not active Timeout

**URL:** <https://discuss.elastic.co/t/create-mapping-error-primary-shard-is-not-active-timeout/88174>\
**Category:** Elasticsearch\
**Created:** [June 4, 2017, 7:56am UTC](https://discuss.elastic.co/t/create-mapping-error-primary-shard-is-not-active-timeout/88174 "2017-06-04T07:56:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laoyang360](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@laoyang360](https://discuss.elastic.co/u/laoyang360)\
**Post date:** [June 4, 2017, 7:56am UTC](https://discuss.elastic.co/t/create-mapping-error-primary-shard-is-not-active-timeout/88174/1 "2017-06-04T07:56:17Z")

</div>

The original ES2.3.4 with 1 node, create mapping and index success.  
And later changed to distributed, extended to three nodes.  
Build a distributed environment successfully.

However, after creating the index, the following error occurs:

`{"Error": {"root_cause": [{"type": "unavailable_shards_exception", "reason": "[es_mse_articles] [3] primary shard is not active Timeout: [1m]`

I Google for a long time, did not find the root cause.

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [June 9, 2017, 11:29am UTC](https://discuss.elastic.co/t/create-mapping-error-primary-shard-is-not-active-timeout/88174/2 "2017-06-09T11:29:22Z")

</div>

It sounds like maybe your cluster is too busy and so it isn't able to create the primary shard before the timeout. Perhaps there is another reason, which should be in the logs.

If you were on Elasticsearch 5, you could use the [cluster-allocation-explain API](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster-allocation-explain.html) to get an easy explanation for what is going wrong.

---

<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 7, 2017, 11:29am UTC](https://discuss.elastic.co/t/create-mapping-error-primary-shard-is-not-active-timeout/88174/3 "2017-07-07T11:29:25Z")

</div>

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