我正在尝试为我的 Elastic 集群创建一个客户端节点,该集群具有 elasticsearch 版本 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: "*"
但是当我在客户端启动弹性搜索服务时,我得到了
[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]; ]
为什么我收到连接被拒绝异常?我的配置有什么遗漏吗?