This repository has been archived by the owner. It is now read-only.

elasticsearch: Better network.host #12985

Closed
wants to merge 1 commit into
from

Conversation

5 participants
@sartak
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@anarchivist

anarchivist Jun 23, 2012

Contributor

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

Contributor

anarchivist commented Jun 23, 2012

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

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Jun 23, 2012

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@karmi

karmi Jun 23, 2012

Contributor

@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?

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

This comment has been minimized.

Show comment
Hide comment
@kimchy

kimchy 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.

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

This comment has been minimized.

Show comment
Hide comment
@karmi

karmi Jun 23, 2012

Contributor

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...

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

This comment has been minimized.

Show comment
Hide comment
@karmi

karmi Jun 24, 2012

Contributor

@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”?

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

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Jun 27, 2012

Contributor

Added as c6518a2

Contributor

adamv commented Jun 27, 2012

Added as c6518a2

@adamv adamv closed this Jun 27, 2012

@karmi

This comment has been minimized.

Show comment
Hide comment
@karmi

karmi Jun 27, 2012

Contributor

@adamv Great!, thanks!

Contributor

karmi commented Jun 27, 2012

@adamv Great!, thanks!

@karmi

This comment has been minimized.

Show comment
Hide comment
@karmi

karmi Jan 15, 2014

Contributor

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_

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.