Friday, March 11, 2016

After upgrading Elasticsearch 2.2.0 from 1.7.2, Other hosts can't connect to it.

After upgrading Elasticsearch 2.2.0 from 1.7.2, Other hosts can't connect to it.

In 1.7.2, it is binding to `0.0.0.0`, so you can access to it from any host:

The network.bind_host setting allows to control the host different network components will bind on. By default, the bind host will be anyLocalAddress (typically 0.0.0.0 or ::0).

But in 2.2.0, it is binding to `127.0.0.1`, so you can't access to it from other hosts:

Defaults to _local_.

To access from other hosts, you have to add the following to `config/elasticsearch.yml`:

network:
  host:
    - _en0_
    - _local_

`en0` will be your network interface.

References:
https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-network.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values

No comments:

Post a Comment