How to resolve elasticsearch status red


(xiaoliang tian) #1

I have one master 1 data and 1 search node,Then are running on AWS

During indexing ,cluster status became from green to red,and there is part
of unassigned shards,I terminated the only data node by mistake,and start a
new VM and let it join into cluster,It turns out status is still red and
All of shards is unassigned.

1.is there any way to recover the status to green?
2.is there any chance I can recovered the data node's data?because I
terminated the only data node
3.And if I met this situation again,I mean "During indexing ,cluster status
became from green to red,and there is part of unassigned shards".How can I
recover status to green

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc9de699-59f6-46a9-8384-64a76878b03d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Jon Attree) #2

Had a similar issue. I managed to recover all my unassigned shards and get
the cluster back to a green status using the following procedure. It could
probably be streamlined but it works.

  1. Dump list of unassigned shards to text file. Using the following command

curl -XGET http://localhost:9200/_cluster/state?pretty=true >>
/tmp/unassign.txt

  1. VI unassign.txt

  2. Search the file for UNASSIGNED

  3. Running the following command on each unassigned shard

curl XPOST -s 'http://localhost:9200/_cluster/reroute?pretty=true' -d '{
"commands" : [ { "allocate" : {

          "index" : "*INDEX TO WISH TO REASSIGN*", "shard" : 0 , "node" 

: "NODE YOU WISH TO ASSIGN IT TO", "allow_primary" : 1 }

    }

]

}’
If the shard is a number other than 0 change it to reflex that as well.

Good luck,

Jon

On Monday, December 16, 2013 2:48:34 AM UTC-8, xiaoliang tian wrote:

I have one master 1 data and 1 search node,Then are running on AWS

During indexing ,cluster status became from green to red,and there is part
of unassigned shards,I terminated the only data node by mistake,and start a
new VM and let it join into cluster,It turns out status is still red and
All of shards is unassigned.

1.is there any way to recover the status to green?
2.is there any chance I can recovered the data node's data?because I
terminated the only data node
3.And if I met this situation again,I mean "During indexing ,cluster
status became from green to red,and there is part of unassigned shards".How
can I recover status to green

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/acfe086c-32d0-47c9-aa2d-39f2ac58986d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(xiaoliang tian) #3

this procedure is really great and helps a lot,thanks!

2013/12/17 Jon Attree jattree@gmail.com

Had a similar issue. I managed to recover all my unassigned shards and get
the cluster back to a green status using the following procedure. It could
probably be streamlined but it works.

  1. Dump list of unassigned shards to text file. Using the following
    command

curl -XGET http://localhost:9200/_cluster/state?pretty=true >>
/tmp/unassign.txt

  1. VI unassign.txt

  2. Search the file for UNASSIGNED

  3. Running the following command on each unassigned shard

curl XPOST -s 'http://localhost:9200/_cluster/reroute?pretty=true' -d '{
"commands" : [ { "allocate" : {

          "index" : "*INDEX TO WISH TO REASSIGN*", "shard" : 0 ,

"node" : "NODE YOU WISH TO ASSIGN IT TO", "allow_primary" : 1 }

    }

]

}’
If the shard is a number other than 0 change it to reflex that as well.

Good luck,

Jon

On Monday, December 16, 2013 2:48:34 AM UTC-8, xiaoliang tian wrote:

I have one master 1 data and 1 search node,Then are running on AWS

During indexing ,cluster status became from green to red,and there is
part of unassigned shards,I terminated the only data node by mistake,and
start a new VM and let it join into cluster,It turns out status is still
red and All of shards is unassigned.

1.is there any way to recover the status to green?
2.is there any chance I can recovered the data node's data?because I
terminated the only data node
3.And if I met this situation again,I mean "During indexing ,cluster
status became from green to red,and there is part of unassigned shards".How
can I recover status to green

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/wvYXXwLgx_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/acfe086c-32d0-47c9-aa2d-39f2ac58986d%40googlegroups.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAJ%3DxLsX9jBYC2JSQFEjicO2tyMAPSun024ho3JiD064Ny%2BOTFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #4

I would set back and ask the question: why are you using a single data node
and a single search node? Are you servers vastly different?

Dedicated search nodes have the primary function of offloading the result
aggregation process from the data nodes. However, you only have one data
node, so the search node is aggregating the results from a single server.

--
Ivan

On Mon, Dec 16, 2013 at 2:48 AM, xiaoliang tian xiaoliang.tian@gmail.comwrote:

I have one master 1 data and 1 search node,Then are running on AWS

During indexing ,cluster status became from green to red,and there is part
of unassigned shards,I terminated the only data node by mistake,and start a
new VM and let it join into cluster,It turns out status is still red and
All of shards is unassigned.

1.is there any way to recover the status to green?
2.is there any chance I can recovered the data node's data?because I
terminated the only data node
3.And if I met this situation again,I mean "During indexing ,cluster
status became from green to red,and there is part of unassigned shards".How
can I recover status to green

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc9de699-59f6-46a9-8384-64a76878b03d%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC96WCtc_MB%3DxaXbibGbFOqDXq84Ne8aF5c6APS3bUoKA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #5