Listen on _local_ and _ec2_


(Mark Varley) #1

Hi - I am just in the process of moving from 1.7 to 2.1. I am using AWS to run my ES instances and have separate VPC networks setup for production and staging. I have my ES instances sitting behind an Elastic load-balancer but typically SSH onto the boxes and run sensitive commands against localhost. With the default settings my instance was only binding to localhost and so was not joining the load balancer. I set:

network.host: _ec2_

...in elasticsearch.yml and the instances were picked up by the load balancer but I could no longer run localhost calls on the box. I have tried the following in my config:

`network.bind_host:

  • local
  • ec2
    network.publish_host: ec2`

...but this puts me back where I was before, bound to localhost but not accessible by the load balancer health check.

How can I configure Elasticsearch 2.1 to behave as 1.7 in this respect?

Thanks in advance for any advice, I have spent the last couple of hours on this and trawling the forums but appear to be stuck.

Thanks,

Mark


(David Pilato) #2

Support for multiple addresses will be added in 2.2.0. See https://github.com/elastic/elasticsearch/pull/13954

For now, on the localhost you have to use the _ec2_ ip address as well.

See also ES 2.1 only bind on localhost


(Mark Varley) #3

Thanks very much David, would be great to have this feature, look forward to 2.2


(system) #4