У меня установлен ES 2.2 на моей цифровой капле океана. Мой файл конфигурации ES выглядит следующим образом:
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: "My Droplet Ip address"
network.bind_host: 127.0.0.1
http.publish_port: 9200
http.port: 9200
#
# Set a custom port for HTTP:
#
# http.port: 9200
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# http.cors.enabled: true
#http.cors.allow-origin: "*"
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
# discovery.zen.minimum_master_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
Теперь, когда я пытаюсь выполнить curl -XGET localhost:9200, он работает правильно, но когда я пытаюсь получить доступ к своему ES с удаленного "http://IpAddress:9200 дает мне CONNECTION REFUSED также curl -XGET IPAddress:9200 дает мне CONNECTION REFUSED
Это отлично работало с ES 1.4, но с 2.X у меня начались проблемы с подключением.
network.bind_host
и оставить толькоnetwork.host
с общедоступным IP-адресом. - person Val   schedule 11.03.2016