0

Trying to run curator locally on an ES instance.

I have this config:

---
# Remember, leave a key empty if there is no value.  None will be a string,
# not a Python "NoneType"
client:
  hosts:
    - 127.0.0.1
  port: 9200
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth:
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: ['elasticsearch', 'urllib3']

127.0.0.1 won't connect, but putting in the server's actual ip will. Do I have to explicitly allow connections to the loopback for ES?

1 Answer 1

1

Not sure which version of Elasticsearch you are using, but, in short, yes, you need to specify that you want to listen on the loopback.

you'll need to set that on the network.host property in your elasticsearch.yml (it accepts an array of values).

network.host : [ "your_server_dns_name", "127.0.0.1" ]

by example.

source : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

3
  • So I have the server's IP set as the network.host (not the loopback). I tried to set the loopback as network.host but then I couldn't access it externally. Is there really no workaround for this? It makes configuration so much easier if i don't have to hard code the server's own IP in network.host. I guess its DNS name is the only option?
    – red888
    Mar 16, 2017 at 21:43
  • 1
    you can do : network.host : [ "your_server_dns_name", "127.0.0.1" ] so that it would bind to both your server ip and localhost
    – maximede
    Mar 16, 2017 at 21:58
  • 1
    Actually, you can also use _en0_ to bind to the ip of the en0 interface ( update to fit your needs). See elastic.co/guide/en/elasticsearch/reference/current/…
    – maximede
    Mar 16, 2017 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.