Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single node cofiguration #220

Closed
sashazykov opened this issue Jun 11, 2014 · 6 comments
Closed

Single node cofiguration #220

sashazykov opened this issue Jun 11, 2014 · 6 comments

Comments

@sashazykov
Copy link

I have one node only and as a result cluster health is always "yellow" and I the node is marked as 'yellow' in mmonit. Is it possible to somehow disable cluster health check for single node configuraltion?

$ curl http://localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "my_elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 30,
  "active_shards" : 30,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 30
}
@davidski
Copy link

Instead of disabling health checks (not recommended), just set the number_of_replicas on your indices (which defaults to 1 replica) to 0. ES won't complain about not having a place to put your replicas and your "cluster" will be green.

@karmi
Copy link
Contributor

karmi commented Jun 11, 2014

@AlexandrZ Yeah, @davidski is right, you should decrease the number of replicas instead.

@sashazykov
Copy link
Author

Thank you! It's helped!

@sashazykov
Copy link
Author

No, unfortunately it hasn't. Config changed:

-index.number_of_replicas: 1
+index.number_of_replicas: 0

but status is still 'yellow'

$ curl http://localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "aa_elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 30,
  "active_shards" : 30,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 30
}

@sashazykov sashazykov reopened this Jun 11, 2014
@karmi
Copy link
Contributor

karmi commented Jun 11, 2014

@AlexandrZ Try curl 'http://localhost:9200/_cluster/health?pretty&level=indices' to see which indices have still replicas=1. The setting you did is on a node level, and applies only to new indices. You can set the number of replicas for all indices, search the ES docs for "Index Update Settings".

@sashazykov
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants