Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

elasticsearch: Better network.host #12985

Closed
wants to merge 1 commit into from
Closed

elasticsearch: Better network.host #12985

wants to merge 1 commit into from

Conversation

sartak
Copy link
Contributor

@sartak sartak commented Jun 23, 2012

ElasticSearch on laptops really want a better network.host configuration, otherwise every time you change networks, it effectively breaks.

See http://sartak.org/2012/06/roaming-elasticsearch.html for a detailed explanation.

@anarchivist
Copy link
Contributor

I'm not sure I see the argument for including this in the formula, though.

@adamv
Copy link
Contributor

adamv commented Jun 23, 2012

I would suggest trying to get this merged upstream into the default configuration; Homebrew itself tries not to maintain config file changes whenever possible.

@adamv adamv closed this Jun 23, 2012
@karmi
Copy link
Contributor

karmi commented Jun 23, 2012

@adamv The same thing could be said about changing the default cluster.name?

If this patch resolves the issue being reported (and maybe "cannot connect to master" errors as well), I would suggest to reconsider.

After all, note that the reason for elasticsearch.yml changes is Set up ElasticSearch for local development...

@kimchy, any opinion on this?

@adamv adamv reopened this Jun 23, 2012
@kimchy
Copy link

kimchy commented Jun 23, 2012

If the aim is to setup elasticsearch for local development, which I believe most if not all users actually do when they install elasticsearch through homebrew, then I personally agree with the change, and as @karmi noted, setting the cluster name to a a user specific one also makes this simpler.

@karmi
Copy link
Contributor

karmi commented Jun 23, 2012

If the aim is to setup elasticsearch for local development

Yes, absolutely -- just for the full context, setting cluster.name to "elasticsearch_#{ENV['USER']}" is done so there are no connection errors when running multiple elasticsearch nodes on development machines within the office (ie. same local network), where development machines would try to form a “bogus cluster”.

I believe (without actually trying it out, though), that @sartak's change resolves a similar issue, where bogus “master not discovered” or other connection errors occur...

@karmi
Copy link
Contributor

karmi commented Jun 24, 2012

@sartak BTW, could you please rewrite the commit message with git commit --amend and then force push here, with a more descriptive content, such as “Added, that network.host is bound to loopback interface to prevent errors when switching networks”?

@adamv
Copy link
Contributor

adamv commented Jun 27, 2012

Added as c6518a2

@adamv adamv closed this Jun 27, 2012
@karmi
Copy link
Contributor

karmi commented Jun 27, 2012

@adamv Great!, thanks!

@karmi
Copy link
Contributor

karmi commented Jan 15, 2014

For the record, if you want to temporarily disable this behaviour, you can:

1/ comment the line starting with network.host in the configuration file,
2/ pass a different setting on the command line, when starting Elasticsearch: elasticsearch -f -D es.network.host=_local_

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants