我的数字海洋水滴上安装了我的 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 中它开始给我带来连接问题