Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:39:10+00:00 2026-06-09T14:39:10+00:00

I have installed ElasticSearch on Mac OS X using Homebrew . It works. The

  • 0

I have installed ElasticSearch on Mac OS X using Homebrew. It works. The cluster started off with “green” health. However, right after adding data, it has gone to “yellow”.

The cluster health is status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.

So, my replica shards are not allocated. How do I allocate them? (I’m thinking out loud.)

According to Shay on “I keep getting cluster health status of Yellow”: “the shard allocation mechanism does not allocate a shard and its replica on the same node, though it does allocate different shards on the same node. So, you will need two nodes to get cluster state of green.”

So, I need to start up a second node. I did this by:

cd ~/Library/LaunchAgents/
cp homebrew.mxcl.elasticsearch.plist homebrew.mxcl.elasticsearch-2.plist
# change line 8 to: homebrew.mxcl.elasticsearch-2
launchctl load -wF ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch-2.plist

Now I have “Korvus” on http://localhost:9200/ and “Iron Monger” on http://localhost:9201/. Woot. But, I don’t see any indications that they know about each other. How do I connect / introduce them to each other?

Note: I read Zen Discovery, but do not feel enlightened yet.

Update 2012-08-13 11:30 PM EST:

Here are my two nodes:

curl "http://localhost:9200/_cluster/health?pretty=true"
{
  "cluster_name" : "elasticsearch_david",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0
}

curl "http://localhost:9201/_cluster/health?pretty=true"
{
  "cluster_name" : "elasticsearch_david",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0
}

Update 2012-08-13 11:35 PM EST:

To clarify, my question is not how to “ignore” the problem by setting index.number_of_replicas: 0. I want multiple nodes, connected.

Update 2012-08-13 11:48 PM EST:

I just posted a double gist that includes elasticsearch.yml and elasticsearch_david.log. It looks to me like both nodes are calling themselves ‘master’. Is that what I should expect?

Update 2012-08-14 12:36 AM EST:

And the novel continues! 🙂 If I disconnect my Mac from all external networks, and then restart the nodes, then they find each other. Double Woot. This makes me think that the problem is with my network/multicast configuration. Currently I have this in my config: network.host: 127.0.0.1. Perhaps this is not correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:39:11+00:00Added an answer on June 9, 2026 at 2:39 pm

    Solved. Do not use network.host: 127.0.0.1. Leave that line commented out to let it be automatically derived.

    The default elasticsearch.yml was correct. A configuration tweak by the Homebrew installer specifies the 127.0.0.1 loopback interface:

    # Set up ElasticSearch for local development:
    inreplace "#{prefix}/config/elasticsearch.yml" do |s|
      # ...
      # 3. Bind to loopback IP for laptops roaming different networks
      s.gsub! /#\s*network\.host\: [^\n]+/, "network.host: 127.0.0.1"
    end
    

    I filed an issue on the Homebrew issue tracker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed pyglet onto Mac OS X 10.7.4 using MacPorts. pyglet only works
I have installed the newest iPython in Mac. However, it uses the Python verion
I have installed rvm after installing Mac OS Lion. The problem which I am
I have installed my dependencies using bundle package Then transferred them to the offline
We have installed OpenDataKit (ODK) Aggregate and we are using a MySQL Database. I
I have installed wxWidgets 2.9.3 on Ubuntu 10.10 using ../configure --with-gtk I am using
I have installed rvm (mutiuser option) and ruby using rvm install on my test
I have installed mySQL using sudo apt-get install mySQL-server then i have installed libmysqlclient15-dev
I have installed tomcat 6 and 7 to the port 8080. I am using
Have installed Node version manager 'n'. Installed 'mocha' using n npm 0.6.4 install mocha

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.