# ELK - indexes blocked : SERVICE\_UNAVAILABLE/1/state not recovered

**URL:** <https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527>\
**Category:** Elasticsearch\
**Created:** [May 3, 2019, 11:43am UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527 "2019-05-03T11:43:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigue](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rodrigue](https://discuss.elastic.co/u/rodrigue)\
**Post date:** [May 3, 2019, 11:43am UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/1 "2019-05-03T11:43:37Z")

</div>

Hello,  
Lately, I upgraded to elastic 6.7.1 (previously 6.2.4) I also upgraded kibana. Suddently I had an exception about monitoring. I searched on the internet and found that solution :  
`
PUT /_cluster/settings
{
"persistent" : {
"xpack.monitoring.collection.enabled" : true
}
}
`

And it worked for several days, until this morning at 01:50... I have an agent that creates snapshots for new indexes, and removes old one... (after snapshoting the index for the past day, I remove the indexes older than 12 month)

Since 01:50, logstash can't bulk any new data. The indexes are blocked. I tried restarting but it changes nothing.

I'm working with only one machine, no cluster...

I will attach my logs... Could you please help me, I tried everything I could... I searched everywhere I know...  
Since my litte problem, in only twelve hours, elastic logged 554 log files...  
I will only attach the first one (all the others are the same)

I created a WeShare link... [https://we.tl/t-qJ2o2SUq3O](https://we.tl/t-qJ2o2SUq3O)

thanks for you help...

---

<div class="post-metadata">

**Author:** ![rodrigue](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rodrigue](https://discuss.elastic.co/u/rodrigue)\
**Post date:** [May 3, 2019, 12:05pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/2 "2019-05-03T12:05:32Z")

</div>

Just in case, if you need it, here is the log file for my first reboot... kibana has a lot of problems with monitoring...  
WeTransfer link : [https://we.tl/t-yp7ZDVj7pE](https://we.tl/t-yp7ZDVj7pE)

Search for "closed" to find the right place to begin... I rebooted à 13:01

I'm really sorry to send you my log files, like this, but I really don't known what to do...

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 3, 2019, 12:41pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/3 "2019-05-03T12:41:15Z")

</div>

The post title says `SERVICE_UNAVAILABLE/1/state not recovered` but I do not see this kind of block mentioned in the log files you shared. I do, however, see a different kind of block, because you [almost ran out of disk space](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html):

```auto
[2019-05-03T01:49:50,228][WARN][o.e.c.r.a.DiskThresholdMonitor] [QHo9DFx] flood stage disk watermark [95%] exceeded on [QHo9DFxYToCEiDvtNuwvQA][QHo9DFx][/var/lib/elasticsearch/nodes/0] free: 14.7gb[4.9%], all indices on this node will be marked read-only
[2019-05-03T01:50:15,174][INFO][o.e.s.SnapshotsService] [QHo9DFx] snapshot [backup_repo_logstash-portail-catalina-out:snapshot-2018.10.22/2x-tRB6ET7KoaNPhP5JdXQ] started
[2019-05-03T01:50:20,423][WARN][o.e.c.r.a.DiskThresholdMonitor] [QHo9DFx] flood stage disk watermark [95%] exceeded on [QHo9DFxYToCEiDvtNuwvQA][QHo9DFx][/var/lib/elasticsearch/nodes/0] free: 14.5gb[4.9%], all indices on this node will be marked read-only
[2019-05-03T01:50:22,369][WARN][o.e.x.m.e.l.LocalExporter] [QHo9DFx] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 3, 2019, 12:45pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/4 "2019-05-03T12:45:34Z")

</div>

Ah ok I see a few `SERVICE_UNAVAILABLE/1/state not recovered` in the second log you shared, shortly after you restarted the node. This is normal behaviour while a node is restarting. Your real problem is the disk space one I mentioned above.

---

<div class="post-metadata">

**Author:** ![rodrigue](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rodrigue](https://discuss.elastic.co/u/rodrigue)\
**Post date:** [May 3, 2019, 1:10pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/5 "2019-05-03T13:10:45Z")

</div>

Thanks for you help... I known that I have this disk problem, but it's a very big disk... It's 300Go... And there is still 10Go free...  
Because of this space problem, I created the agent that I mentionned on my first post.  
I executed it by hand. Now, there are 40Go free. But I still have the problem.  
How can I solve it? What is the first step?

My logstash log says : [2019-05-03T01:50:18,727][INFO][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=\>"cluster\_block\_exception", "reason"=\>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"})

---

<div class="post-metadata">

**Author:** ![rodrigue](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rodrigue](https://discuss.elastic.co/u/rodrigue)\
**Post date:** [May 3, 2019, 1:35pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/7 "2019-05-03T13:35:21Z")

</div>

I think I found the solutions for the kibana monitoring problem. I've executed this :  
`
PUT _settings
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}
`

Could you please explain me why I had to do it?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 3, 2019, 1:40pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/8 "2019-05-03T13:40:42Z")

</div>

> [@rodrigue](#):
>
> Could you please explain me why I had to do it?

Sure, from the [docs I linked above](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html):

> The index block must be released manually once there is enough disk space available to allow indexing operations to continue.

300GB is quite a small disk, and 10GB is less than 4% free. By default Elasticsearch makes indices read-only when the free space drops below 5%. This allows a small amount of extra space for recovery.

---

<div class="post-metadata">

**Author:** ![rodrigue](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rodrigue](https://discuss.elastic.co/u/rodrigue)\
**Post date:** [May 3, 2019, 2:37pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/9 "2019-05-03T14:37:13Z")

</div>

thanks... I don't have the solution, but you should think about having error message easier to read...  
For exemple : give possible solution to problems... I searched everywhere for my problem and usually I don't need to bother people on forums. But this time I really couldn't find the problem and I had no idea about where to start...

Thanks for your help

---

<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:** [May 31, 2019, 2:37pm UTC](https://discuss.elastic.co/t/elk-indexes-blocked-service-unavailable-1-state-not-recovered/179527/10 "2019-05-31T14:37:28Z")

</div>

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