Elasticsearch:无法创建客户端节点

时间:2016-03-31 14:28:25

标签: elasticsearch elasticsearch-2.0

我正在尝试为我的弹性群集创建一个客户端节点,该群集的弹性搜索版本为2.2.0。我的集群中有4个节点,每个节点都可以是数据节点或主节点。现在,我想创建一个客户端节点,它将ping我的其他4个节点之一。我的意图是,即使我的4个主节点中的一个出现故障,我的客户端也能从某个功能节点获取数据。

这是我的客户端的elasticsearch.yml

cluster.name: myCluster
node.name: myClient
node.master: false
node.data: false
discovery.zen.ping.unicast.hosts: ["box1:9300","box2:9300","box3:9300","box4:9300"]
discovery.zen.fd.ping_timeout: 30s
discovery.zen.minimum_master_nodes: 3
discovery.zen.ping.multicast.enabled: false

上述每个框都配置为

cluster.name: myCluster
node.name: n2
path.data: /asd/thth/jtjut/elastic
path.logs: /var/log/eslogs
network.host: box2
node.master: true
node.data: true
index.number_of_replicas: 1
discovery.zen.ping.unicast.hosts: ["box1:9300","box2:9300","box3:9300","box4:9300"]
discovery.zen.fd.ping_timeout: 30s
discovery.zen.minimum_master_nodes: 3
discovery.zen.ping.multicast.enabled: false

action.disable_delete_all_indices: true

http.cors.enabled: true
http.cors.allow-origin: "*"

但是当我在客户端上启动elasticsearch服务时,我得到了

[2016-03-31 10:24:07,576][INFO ][discovery.zen            ] [myClient] failed
to send join request to master [{n2}{5vlJHDZaQhGttqZsD5gVvA}{34.87.98.213}{34.87.98.213:9300}{master=true}], reason [RemoteTransportException[[n2] 34.87.98.213:9300][internal:discovery/zen/join]]; nested:ConnectTransportException[[myClient][127.0.0.1:9300] connect_timeout[30s]]; nested: NotSerializableExceptionWrapper[Connection refused: /127.0.0.1:9300]; ]

为什么我得到连接拒绝例外?我的配置中是否有任何遗漏?

0 个答案:

没有答案