# Create index fails with shard\_acknowledged = false

**URL:** <https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640>\
**Category:** Elasticsearch\
**Created:** [January 30, 2018, 2:41pm UTC](https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640 "2018-01-30T14:41:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.hashemian](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@m.hashemian](https://discuss.elastic.co/u/m.hashemian)\
**Post date:** [January 30, 2018, 2:41pm UTC](https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640/1 "2018-01-30T14:41:47Z")

</div>

Hi,

I'm using elastic 6.1 on CentOS 7. The server is a bit slow. When I try to create an index using this command:

```
curl -XPUT 'localhost:9200/user_activity?pretty' -H 'Content-Type: application/json' -d'
{
    "settings" : {
        "index" : {
            "codec": "best_compression",
            "number_of_shards" : 1,
            "number_of_replicas" : 0,
            "mapper.dynamic": false
        }
    },
    "mappings" : {
        "user_activity" : {
            "_all": { "enabled": false },
            "properties" : {
                "timestamp": { "type": "date"},
                "user_id": { "type": "integer"},
                ...
            }
        }
    }
}
'

```

it apparently works, but the output is like this:

```
{
  "acknowledged" : true,
  "shards_acknowledged" : false,
  "index" : "user_activity"
}

```

Then when I check index health, it's red:

```
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
red open user_activity DVG88zczRB21G155LB0DTw 1 0

```

And I cannot insert any document. I couldn't find anyway to retry shard allocation. So I kept deleting the index and recreating it. The logs look like this:

```
[2018-01-30T09:39:45,434][INFO][o.e.c.m.MetaDataDeleteIndexService] [U62E07S] [user_activity/PYM7qf52RVONyRYYNP_iug] deleting index
[2018-01-30T09:39:48,696][INFO][o.e.c.m.MetaDataCreateIndexService] [U62E07S] [user_activity] creating index, cause [api], templates [], shards [1]/[0], mappings [user_activity]
[2018-01-30T09:39:48,697][INFO][o.e.c.r.a.AllocationService] [U62E07S] Cluster health status changed from [YELLOW] to [RED] (reason: [index [user_activity] created]).

```

and then the same message:

```
{
  "acknowledged" : true,
  "shards_acknowledged" : false,
  "index" : "user_activity"
}

```

Any idea how I can create the index?

Thanks

---

<div class="post-metadata">

**Author:** ![mayya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayya/32/83147_2.png) [@mayya](https://discuss.elastic.co/u/mayya)\
**Post date:** [January 30, 2018, 2:52pm UTC](https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640/2 "2018-01-30T14:52:16Z")

</div>

What response you get when you run:  
`curl -XGET 'localhost:9200/_cluster/allocation/explain'` ?

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@m.hashemian](https://discuss.elastic.co/u/m.hashemian)\
**Post date:** [January 30, 2018, 5:58pm UTC](https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640/3 "2018-01-30T17:58:25Z")

</div>

Here is the output:

```
{
 “index”: “user_activity”,
 “shard”: 0,
 “primary”: true,
 “current_state”: “unassigned”,
 “unassigned_info”: {
   “reason”: “INDEX_CREATED”,
   “at”: “2018-01-30T14:39:48.696Z”,
   “last_allocation_status”: “no”
 },
 “can_allocate”: “no”,
 “allocate_explanation”: “cannot allocate because allocation is not permitted to any of the nodes”,
 “node_allocation_decisions”: [
   {
     “node_id”: “U62E07S0Tm2ux_ozxD2swA”,
     “node_name”: “U62E07S”,
     “transport_address”: “127.0.0.1:9300",
     “node_decision”: “no”,
     “weight_ranking”: 1,
     “deciders”: [
       {
         “decider”: “enable”,
         “decision”: “NO”,
         “explanation”: “no allocations are allowed due to cluster setting [cluster.routing.allocation.enable=none]”
       }
     ]
   }
 ]
}

```

I think I figured out the reason. I had recently upgraded from 5.6 to 6.1 and I forgot to re-enable shard allocation after the upgrade. I re-enabled the shard allocation, recreated the index and it worked as expected.

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:** [February 27, 2018, 5:58pm UTC](https://discuss.elastic.co/t/create-index-fails-with-shard-acknowledged-false/117640/4 "2018-02-27T17:58:44Z")

</div>

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