# Index in red

**URL:** <https://discuss.elastic.co/t/index-in-red/130677>\
**Category:** Elasticsearch\
**Created:** [May 4, 2018, 7:13pm UTC](https://discuss.elastic.co/t/index-in-red/130677 "2018-05-04T19:13:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaroslav\_Glodov](https://avatars.discourse-cdn.com/v4/letter/y/a6a055/32.png) [@Yaroslav\_Glodov](https://discuss.elastic.co/u/Yaroslav_Glodov)\
**Post date:** [May 4, 2018, 7:13pm UTC](https://discuss.elastic.co/t/index-in-red/130677/1 "2018-05-04T19:13:13Z")

</div>

Elasticsearch not working periodically.  
Version: 5.5.0

Error:

```
curl http://localhost:9200/_cluster/allocation/explain?pretty
{
  "index" : "donprinton",
  "shard" : 0,
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "ALLOCATION_FAILED",
    "at" : "2018-05-04T09:14:46.875Z",
    "failed_allocation_attempts" : 5,
    "details" : "failed to create shard, failure IOException[No space left on device]",
    "last_allocation_status" : "no"
  },
  "can_allocate" : "no",
  "allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes that hold an in-sync shard copy",
  "node_allocation_decisions" : [
    {
      "node_id" : "Su43ATrCTRym7FMPqZACbQ",
      "node_name" : "Su43ATr",
      "transport_address" : "127.0.0.1:9300",
      "node_decision" : "no",
      "store" : {
        "in_sync" : true,
        "allocation_id" : "2rBn4EEnQSKE4_q0PF5IwA"
      },
      "deciders" : [
        {
          "decider" : "max_retry",
          "decision" : "NO",
          "explanation" : "shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [/_cluster/reroute?retry_failed=true] to retry, [unassigned_info[[reason=ALLOCATION_FAILED], at[2018-05-04T09:14:46.875Z], failed_attempts[5], delayed=false, details[failed to create shard, failure IOException[No space left on device]], allocation_status[deciders_no]]]"
        }
      ]
    }
  ]
}

```

Disk usage information (200G available):

```
df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 788M 94M 694M 12% /run
/dev/sda2 909G 709G 201G 78% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 922M 897M 9.6M 99% /boot
tmpfs 788M 0 788M 0% /run/user/1001

```

Index size (26M only):

```
du -sh /usr/local/etc/elasticsearch/data/
26M	/usr/local/etc/elasticsearch/data/
```

---

<div class="post-metadata">

**Author:** ![atira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atira/32/28699_2.png) [@atira](https://discuss.elastic.co/u/atira)\
**Post date:** [May 4, 2018, 10:40pm UTC](https://discuss.elastic.co/t/index-in-red/130677/2 "2018-05-04T22:40:32Z")

</div>

> [@Yaroslav\_Glodov](#):
>
> allocation is not permitted

How do permissions look like? Does the user who runs Elasticsearch have write permissions for that folder?

---

<div class="post-metadata">

**Author:** ![Yaroslav\_Glodov](https://avatars.discourse-cdn.com/v4/letter/y/a6a055/32.png) [@Yaroslav\_Glodov](https://discuss.elastic.co/u/Yaroslav_Glodov)\
**Post date:** [May 6, 2018, 5:36am UTC](https://discuss.elastic.co/t/index-in-red/130677/3 "2018-05-06T05:36:05Z")

</div>

Elastic search is running under www-data, all /data/ folder is under www-data, user which running is www-data.  
It does work for days and occasionally just stop working.  
I run re-index (deleting old index and creating new one) and it works for next few days. So, I used simple solution - by cron I re-index every night whole database. It helped for few weeks, but suddenly it started to stop working again.

---

<div class="post-metadata">

**Author:** ![atira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atira/32/28699_2.png) [@atira](https://discuss.elastic.co/u/atira)\
**Post date:** [May 6, 2018, 9:07am UTC](https://discuss.elastic.co/t/index-in-red/130677/4 "2018-05-06T09:07:00Z")

</div>

What do the logs show?  
I had allocation problems related to virtual memory.

---

<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:** [June 3, 2018, 9:07am UTC](https://discuss.elastic.co/t/index-in-red/130677/5 "2018-06-03T09:07:04Z")

</div>

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