# Tweezer fixes to status-red don't work, may need sledgehammer

**URL:** https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893
**Category:** Elasticsearch
**Created:** [November 21, 2014, 7:21pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893 "2014-11-21T19:21:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![pitaga1](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@pitaga1](https://discuss.elastic.co/u/pitaga1)
#### Post date: [November 21, 2014, 7:21pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/1 "2014-11-21T19:21:26Z")

</div>

When I shutdown and restart Elasticsearch on my Ubuntu laptop, the status  
is yellow until I attempt to open an index, at which time the status  
changes to red. The output for

```
curl "http://localhost:9200/_cluster/health?pretty=true"

```

is

```
{
  "cluster_name" : "elasticsearch",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 2,
  "active_shards" : 2,
  "relocating_shards" : 0,
  "initializing_shards" : 5,
  "unassigned_shards" : 7
}

```

I've tried deleting all but one index, shutting down and restarting. I've  
also tried issuing

```
curl -XPUT 'localhost:9200/testindex2/_settings' -d 

```

'{"index.routing.allocation.disable\_allocation": false}'

shutting down and restarting. I've also tried issuing

curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
'{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
"node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’

for one particular index and shard, with no apparent effect on the output of

```
curl -XGET http://localhost:9200/_cluster/state?pretty=true

```

In each case, I shutdown with

```
curl -XPOST 'http://localhost:9200/_shutdown'

```

and restarted with

```
/etc/init.d/elasticsearch restart

```

The one remaining undeleted index is currently used only for  
experimentation. I can delete and then re-establish it if necessary. Or I  
can apply a bigger sledgehammer if necessary.

I found elements of diagnostics and suggested solutions by searching the  
web. I am not now, and possibly I will never be, a qualified Elasticsearch  
administrator. I'd be grateful for suggestions on how to fix this, in terms  
a child can understand.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2a809850-58d0-4ee8-803c-18160088a2ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a809850-58d0-4ee8-803c-18160088a2ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)
#### Post date: [November 24, 2014, 4:15pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/2 "2014-11-24T16:15:55Z")

</div>

Just a wild guess, but it seems that the /etc/init.d/elasticsearch restart  
command will, if properly named, stop a currently running instance and then  
start it.

If you issue the curl \_shutdown command and then the restart command  
directly after without any delays, then perhaps that double blow from your  
sledgehammer is causing some corruption.

In general, it's not good to mix HTTP REST (curl) commands and scripts that  
directly handle processes without adequate delays to ensure they aren't  
hammering on each other.

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d2679372-8184-4578-a9f6-a88dfe31ad42%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d2679372-8184-4578-a9f6-a88dfe31ad42%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![pitaga1](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@pitaga1](https://discuss.elastic.co/u/pitaga1)
#### Post date: [November 24, 2014, 6:08pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/3 "2014-11-24T18:08:55Z")

</div>

Brian, thanks for the help on correcting what I've been doing. Once I get  
my system unwedged, I won't mix curl commands and scripts.

I deleted the one remaining index that I had established, and then all the  
remaining .marvel indexes. Then I re-established mapping and settings for  
my index. When I tried to open the index, I got an '"acknowledged" : false'  
response on the first try, and an '"acknowledged" : true' response on the  
second try. When I tried to put a document in this index, I got

```
"error":"UnavailableShardsException[[testindex2][3] [2] shardIt, [0] 

```

active : Timeout waiting for [1m] ...

According to what I've read, even if I uninstall and re-install  
Elasticsearch on my laptop, it might be unusable. I expect a need a tweezer  
fix that's informed by knowledge of how Elasticsearch manages shards. I'd  
be grateful for possible recipes on how to fix this, and also for a pointer  
to a clear and concise description of Elasticsearch shard management.

Thanks.

On Friday, November 21, 2014 11:21:26 AM UTC-8, Pitaga wrote:

> When I shutdown and restart Elasticsearch on my Ubuntu laptop, the status  
> is yellow until I attempt to open an index, at which time the status  
> changes to red. The output for
> 
> ```
> curl "http://localhost:9200/_cluster/health?pretty=true"
> 
> ```
> 
> is
> 
> ```
> {
> "cluster_name" : "elasticsearch",
> "status" : "red",
> "timed_out" : false,
> "number_of_nodes" : 1,
> "number_of_data_nodes" : 1,
> "active_primary_shards" : 2,
> "active_shards" : 2,
> "relocating_shards" : 0,
> "initializing_shards" : 5,
> "unassigned_shards" : 7
> }
> 
> ```
> 
> I've tried deleting all but one index, shutting down and restarting. I've  
> also tried issuing
> 
> ```
> curl -XPUT 'localhost:9200/testindex2/_settings' -d 
> 
> ```
> 
> '{"index.routing.allocation.disable\_allocation": false}'
> 
> shutting down and restarting. I've also tried issuing
> 
> curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
> '{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
> "node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’
> 
> for one particular index and shard, with no apparent effect on the output  
> of
> 
> ```
> curl -XGET http://localhost:9200/_cluster/state?pretty=true
> 
> ```
> 
> In each case, I shutdown with
> 
> ```
> curl -XPOST 'http://localhost:9200/_shutdown'
> 
> ```
> 
> and restarted with
> 
> ```
> /etc/init.d/elasticsearch restart
> 
> ```
> 
> The one remaining undeleted index is currently used only for  
> experimentation. I can delete and then re-establish it if necessary. Or I  
> can apply a bigger sledgehammer if necessary.
> 
> I found elements of diagnostics and suggested solutions by searching the  
> web. I am not now, and possibly I will never be, a qualified Elasticsearch  
> administrator. I'd be grateful for suggestions on how to fix this, in terms  
> a child can understand.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [November 24, 2014, 9:44pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/4 "2014-11-24T21:44:20Z")

</div>

You have 7 unassigned shards. Are you sure you always had one node in the  
cluster?

It seems there were once more than one nodes. So start two (or more) nodes  
on your laptop and the cluster state will get green.

Note, on single node, always create with replica level 0. The default is 1,  
which has been source of confusion, it is convenient to show fault  
tolerance, but on a laptop, that does not make sense.

Jörg

On Mon, Nov 24, 2014 at 7:08 PM, Pitaga [achats@blarg.net](mailto:achats@blarg.net) wrote:

> Brian, thanks for the help on correcting what I've been doing. Once I get  
> my system unwedged, I won't mix curl commands and scripts.
> 
> I deleted the one remaining index that I had established, and then all the  
> remaining .marvel indexes. Then I re-established mapping and settings for  
> my index. When I tried to open the index, I got an '"acknowledged" : false'  
> response on the first try, and an '"acknowledged" : true' response on the  
> second try. When I tried to put a document in this index, I got
> 
> ```
> "error":"UnavailableShardsException[[testindex2][3] [2] shardIt, [0]
> 
> ```
> 
> active : Timeout waiting for [1m] ...
> 
> According to what I've read, even if I uninstall and re-install  
> Elasticsearch on my laptop, it might be unusable. I expect a need a tweezer  
> fix that's informed by knowledge of how Elasticsearch manages shards. I'd  
> be grateful for possible recipes on how to fix this, and also for a pointer  
> to a clear and concise description of Elasticsearch shard management.
> 
> Thanks.
> 
> On Friday, November 21, 2014 11:21:26 AM UTC-8, Pitaga wrote:
> 
> > When I shutdown and restart Elasticsearch on my Ubuntu laptop, the  
> > status is yellow until I attempt to open an index, at which time the status  
> > changes to red. The output for
> > 
> > ```
> > curl "http://localhost:9200/_cluster/health?pretty=true"
> > 
> > ```
> > 
> > is
> > 
> > ```
> > {
> > "cluster_name" : "elasticsearch",
> > "status" : "red",
> > "timed_out" : false,
> > "number_of_nodes" : 1,
> > "number_of_data_nodes" : 1,
> > "active_primary_shards" : 2,
> > "active_shards" : 2,
> > "relocating_shards" : 0,
> > "initializing_shards" : 5,
> > "unassigned_shards" : 7
> > }
> > 
> > ```
> > 
> > I've tried deleting all but one index, shutting down and restarting. I've  
> > also tried issuing
> > 
> > ```
> > curl -XPUT 'localhost:9200/testindex2/_settings' -d
> > 
> > ```
> > 
> > '{"index.routing.allocation.disable\_allocation": false}'
> > 
> > shutting down and restarting. I've also tried issuing
> > 
> > curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
> > '{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
> > "node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’
> > 
> > for one particular index and shard, with no apparent effect on the output  
> > of
> > 
> > ```
> > curl -XGET http://localhost:9200/_cluster/state?pretty=true
> > 
> > ```
> > 
> > In each case, I shutdown with
> > 
> > ```
> > curl -XPOST 'http://localhost:9200/_shutdown'
> > 
> > ```
> > 
> > and restarted with
> > 
> > ```
> > /etc/init.d/elasticsearch restart
> > 
> > ```
> > 
> > The one remaining undeleted index is currently used only for  
> > experimentation. I can delete and then re-establish it if necessary. Or I  
> > can apply a bigger sledgehammer if necessary.
> > 
> > I found elements of diagnostics and suggested solutions by searching the  
> > web. I am not now, and possibly I will never be, a qualified Elasticsearch  
> > administrator. I'd be grateful for suggestions on how to fix this, in terms  
> > a child can understand.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8f4a5795-eec6-4415-acef-16d8bc29e63b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFvTbdPazd4bWOw5wj\_9m%3D9DrK%2BCUMTPR5qEQVy99UJ0g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFvTbdPazd4bWOw5wj_9m%3D9DrK%2BCUMTPR5qEQVy99UJ0g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![pitaga1](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@pitaga1](https://discuss.elastic.co/u/pitaga1)
#### Post date: [November 24, 2014, 11:03pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/5 "2014-11-24T23:03:53Z")

</div>

Thanks, Joerg.

```
bin/elasticsearch -Des.node.data=true -Des.de.master=false 

```

-Des.node.name=DataOne

and

```
curl -XPUT 'localhost:9200/testindex2/_settings' -d ' {"index" : 

```

{"number\_of\_replicas" : 0}}'

with several restarts, have got me to a state where I see the following  
command-response sequence:

```
curl "http://localhost:9200/_cluster/health?pretty=true"{
  "cluster_name" : "elasticsearch",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 1,
  "active_shards" : 1,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 33
}
curl -XPOST "http://localhost:9200/testindex2/_open"
{"acknowledged":false}
curl -XPOST "http://localhost:9200/testindex2/_open"
{"acknowledged":true}
curl "http://localhost:9200/_cluster/health?pretty=true"{
  "cluster_name" : "elasticsearch",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 1,
  "active_shards" : 1,
  "relocating_shards" : 0,
  "initializing_shards" : 5,
  "unassigned_shards" : 33
}

```

At one point I saw  
curl "[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)" {  
"cluster\_name" : "elasticsearch",  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 2,  
"number\_of\_data\_nodes" : 2,  
"active\_primary\_shards" : 17,  
"active\_shards" : 17,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 17  
}

Marvel overview now shows a single node at 192.168.0.9:9300. That's 9300,  
not 9200. I have no idea how the second node disappeared. It looks like  
when I try to open testindex2, after deleting it and partially  
re-establishing it, Elasticsearch gets stuck while trying to initialize 5  
residual shards.

I'm utterly confused. I'm also motivated to learn more about node  
management. I'd really like to do this with a working installation. How can  
I untangle myself?

Thanks.

On Friday, November 21, 2014 11:21:26 AM UTC-8, Pitaga wrote:

> When I shutdown and restart Elasticsearch on my Ubuntu laptop, the status  
> is yellow until I attempt to open an index, at which time the status  
> changes to red. The output for
> 
> ```
> curl "http://localhost:9200/_cluster/health?pretty=true"
> 
> ```
> 
> is
> 
> ```
> {
> "cluster_name" : "elasticsearch",
> "status" : "red",
> "timed_out" : false,
> "number_of_nodes" : 1,
> "number_of_data_nodes" : 1,
> "active_primary_shards" : 2,
> "active_shards" : 2,
> "relocating_shards" : 0,
> "initializing_shards" : 5,
> "unassigned_shards" : 7
> }
> 
> ```
> 
> I've tried deleting all but one index, shutting down and restarting. I've  
> also tried issuing
> 
> ```
> curl -XPUT 'localhost:9200/testindex2/_settings' -d 
> 
> ```
> 
> '{"index.routing.allocation.disable\_allocation": false}'
> 
> shutting down and restarting. I've also tried issuing
> 
> curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
> '{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
> "node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’
> 
> for one particular index and shard, with no apparent effect on the output  
> of
> 
> ```
> curl -XGET http://localhost:9200/_cluster/state?pretty=true
> 
> ```
> 
> In each case, I shutdown with
> 
> ```
> curl -XPOST 'http://localhost:9200/_shutdown'
> 
> ```
> 
> and restarted with
> 
> ```
> /etc/init.d/elasticsearch restart
> 
> ```
> 
> The one remaining undeleted index is currently used only for  
> experimentation. I can delete and then re-establish it if necessary. Or I  
> can apply a bigger sledgehammer if necessary.
> 
> I found elements of diagnostics and suggested solutions by searching the  
> web. I am not now, and possibly I will never be, a qualified Elasticsearch  
> administrator. I'd be grateful for suggestions on how to fix this, in terms  
> a child can understand.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/15cd7713-a78c-4727-9de3-664837034b07%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/15cd7713-a78c-4727-9de3-664837034b07%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![pitaga1](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@pitaga1](https://discuss.elastic.co/u/pitaga1)
#### Post date: [November 25, 2014, 10:36pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/6 "2014-11-25T22:36:48Z")

</div>

Doing a thorough job of deleting all indexes got my installation back to  
status yellow, apparently fully functional when I re-established my test  
index with a new name. Sledgehammer, but I didn't need to sow the ground  
with salt.

On Friday, November 21, 2014 11:21:26 AM UTC-8, Pitaga wrote:

> When I shutdown and restart Elasticsearch on my Ubuntu laptop, the status  
> is yellow until I attempt to open an index, at which time the status  
> changes to red. The output for
> 
> ```
> curl "http://localhost:9200/_cluster/health?pretty=true"
> 
> ```
> 
> is
> 
> ```
> {
> "cluster_name" : "elasticsearch",
> "status" : "red",
> "timed_out" : false,
> "number_of_nodes" : 1,
> "number_of_data_nodes" : 1,
> "active_primary_shards" : 2,
> "active_shards" : 2,
> "relocating_shards" : 0,
> "initializing_shards" : 5,
> "unassigned_shards" : 7
> }
> 
> ```
> 
> I've tried deleting all but one index, shutting down and restarting. I've  
> also tried issuing
> 
> ```
> curl -XPUT 'localhost:9200/testindex2/_settings' -d 
> 
> ```
> 
> '{"index.routing.allocation.disable\_allocation": false}'
> 
> shutting down and restarting. I've also tried issuing
> 
> curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
> '{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
> "node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’
> 
> for one particular index and shard, with no apparent effect on the output  
> of
> 
> ```
> curl -XGET http://localhost:9200/_cluster/state?pretty=true
> 
> ```
> 
> In each case, I shutdown with
> 
> ```
> curl -XPOST 'http://localhost:9200/_shutdown'
> 
> ```
> 
> and restarted with
> 
> ```
> /etc/init.d/elasticsearch restart
> 
> ```
> 
> The one remaining undeleted index is currently used only for  
> experimentation. I can delete and then re-establish it if necessary. Or I  
> can apply a bigger sledgehammer if necessary.
> 
> I found elements of diagnostics and suggested solutions by searching the  
> web. I am not now, and possibly I will never be, a qualified Elasticsearch  
> administrator. I'd be grateful for suggestions on how to fix this, in terms  
> a child can understand.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 25, 2014, 10:44pm UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/7 "2014-11-25T22:44:58Z")

</div>

You can get it to green if you get rid of the replicas - curl -XPUT  
localhost:9200/\*/\_settings -d '{ "index" : { "number\_of\_replicas" : 0 } }'

On 26 November 2014 at 09:36, Pitaga [achats@blarg.net](mailto:achats@blarg.net) wrote:

> Doing a thorough job of deleting all indexes got my installation back to  
> status yellow, apparently fully functional when I re-established my test  
> index with a new name. Sledgehammer, but I didn't need to sow the ground  
> with salt.
> 
> On Friday, November 21, 2014 11:21:26 AM UTC-8, Pitaga wrote:
> 
> > When I shutdown and restart Elasticsearch on my Ubuntu laptop, the  
> > status is yellow until I attempt to open an index, at which time the status  
> > changes to red. The output for
> > 
> > ```
> > curl "http://localhost:9200/_cluster/health?pretty=true"
> > 
> > ```
> > 
> > is
> > 
> > ```
> > {
> > "cluster_name" : "elasticsearch",
> > "status" : "red",
> > "timed_out" : false,
> > "number_of_nodes" : 1,
> > "number_of_data_nodes" : 1,
> > "active_primary_shards" : 2,
> > "active_shards" : 2,
> > "relocating_shards" : 0,
> > "initializing_shards" : 5,
> > "unassigned_shards" : 7
> > }
> > 
> > ```
> > 
> > I've tried deleting all but one index, shutting down and restarting. I've  
> > also tried issuing
> > 
> > ```
> > curl -XPUT 'localhost:9200/testindex2/_settings' -d
> > 
> > ```
> > 
> > '{"index.routing.allocation.disable\_allocation": false}'
> > 
> > shutting down and restarting. I've also tried issuing
> > 
> > curl XPOST '[http://localhost:9200/\_cluster/reroute?pretty=true](http://localhost:9200/_cluster/reroute?pretty=true)' -d  
> > '{"commands" : [ { "allocate" : { "index" : "testindex1", "shard" : 4 ,  
> > "node" : "gdVC517DR4OiE0v44\_1n5A", "allow\_primary" : 1 } }]}’
> > 
> > for one particular index and shard, with no apparent effect on the output  
> > of
> > 
> > ```
> > curl -XGET http://localhost:9200/_cluster/state?pretty=true
> > 
> > ```
> > 
> > In each case, I shutdown with
> > 
> > ```
> > curl -XPOST 'http://localhost:9200/_shutdown'
> > 
> > ```
> > 
> > and restarted with
> > 
> > ```
> > /etc/init.d/elasticsearch restart
> > 
> > ```
> > 
> > The one remaining undeleted index is currently used only for  
> > experimentation. I can delete and then re-establish it if necessary. Or I  
> > can apply a bigger sledgehammer if necessary.
> > 
> > I found elements of diagnostics and suggested solutions by searching the  
> > web. I am not now, and possibly I will never be, a qualified Elasticsearch  
> > administrator. I'd be grateful for suggestions on how to fix this, in terms  
> > a child can understand.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/44983fbf-dc7d-498a-9e34-387124fa3225%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZ%3DOw80b9R%3Dt8edySUf\_pZyxH4N83axkTaStoPOaEn%2BHiQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZ%3DOw80b9R%3Dt8edySUf_pZyxH4N83axkTaStoPOaEn%2BHiQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:47am UTC](https://discuss.elastic.co/t/tweezer-fixes-to-status-red-dont-work-may-need-sledgehammer/20893/8 "2017-07-06T00:47:33Z")

</div>


