# New ES Instance Unassigned Shards

**URL:** <https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313>\
**Category:** Elasticsearch\
**Created:** [June 18, 2018, 1:21pm UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313 "2018-06-18T13:21:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarrad](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jarrad](https://discuss.elastic.co/u/Jarrad)\
**Post date:** [June 18, 2018, 1:21pm UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/1 "2018-06-18T13:21:36Z")

</div>

Hi all

I've read several answers on the topic around unassigned shards, from data about thread pools to checking how many replicas are configured but none of those seem to have answers.

I've literally just built a brand new elasticsearch 6.3 node (for home use) with logstash and kibana on top. It currently has 1 filebeat client feeding data into logstash and with output to elastic.

I have 3 unassigned shards. The instance is not clustered, it is single node, it has plenty of RAM and heap available and it's been an hour. I am imagining these 3 unassigned shards are due to 3 being the default number of shards from filebeat.

What I want to know is how can I already have unassigned shards? I'd rather resolve this now before I start having other filebeats starting to deliver logs.

Please let me know any config I might need to post here.

```
{
"cluster_name" : "ES_Cluster",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 6,
"active_shards" : 6,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 3,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 66.66666666666666
}

```

Or am I just going crazy and I don't need to bother?

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2018, 2:04pm UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/2 "2018-06-18T14:04:27Z")

</div>

This is expected as you probably have one replica per primary defined.  
As you have only one node, replicas are not allocated.

Either start a new node or change the number of replicas to 0.

---

<div class="post-metadata">

**Author:** ![Jarrad](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jarrad](https://discuss.elastic.co/u/Jarrad)\
**Post date:** [June 18, 2018, 2:14pm UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/3 "2018-06-18T14:14:13Z")

</div>

Perfect thank you.

In case anyone is wondering (there is a lot of information out there about earlier versions of elastic and the error information printed by elastic starting up didnt work for me) you can't do it in the elasticsearch.yml but this works:

```
curl -X PUT "localhost:9200/_all/_settings" -H 'Content-Type: application/json' -d'
{
    "index" : {
        "number_of_replicas" : 0
    }
}
'
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2018, 2:35pm UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/4 "2018-06-18T14:35:41Z")

</div>

Note that you might have a template created by filebeat so it would be better to modify the template as well so next day, you'll start with the right values.

Check:

```
GET /_template

```

Doc: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)

---

<div class="post-metadata">

**Author:** ![Jarrad](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jarrad](https://discuss.elastic.co/u/Jarrad)\
**Post date:** [June 20, 2018, 11:31am UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/5 "2018-06-20T11:31:36Z")

</div>

Would it be fair to assume then that this is probably what I need to edit into the template as so?

```
{
  "filebeat-6.3.0" : {
    "order" : 1,
    "index_patterns" : [
      "filebeat-6.3.0-*"
    ],
    "settings" : {
      "index" : {
          "number_of_replicas" : 0
        "mapping" : {
          "total_fields" : {
            "limit" : "10000"
          }
        },
```

---

<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 18, 2018, 11:31am UTC](https://discuss.elastic.co/t/new-es-instance-unassigned-shards/136313/6 "2018-07-18T11:31:42Z")

</div>

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