我有一个由4个节点组成的集群,2个主服务器和2个从服务器都在docker上运行。
主人的配置如下:
network:
host: 0.0.0.0
publish_host: myIP
http:
port: 9201
transport.tcp.port: 9301
path:
logs: "/usr/share/elasticsearch/logs"
discovery.zen.minimum_master_nodes: 2
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Authorization, Content-Length
cluster.name: lpfrlogsconcentration
node:
name: "node-1"
master: true
data: false
ingest: true
discovery.zen.ping.unicast.hosts:
- myIP:9301
- myIP:9302
- myIP:9303
- myIP:9304
对于奴隶来说,它是:
network:
host: 0.0.0.0
publish_host: myIP
http:
port: 9203
transport.tcp.port: 9303
path:
logs: "/usr/share/elasticsearch/logs"
discovery.zen.minimum_master_nodes: 2
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Authorization, Content-Length
cluster.name: lpfrlogsconcentration
node:
name: "node-3"
master: false
data: true
ingest: true
discovery.zen.ping.unicast.hosts:
- myIP:9301
- myIP:9302
- myIP:9303
- myIP:9304
但是,当我运行码头工具时,我进入节点1& 2(主人)这个错误:
[2018-06-14T08:41:02,744][INFO ][o.e.d.z.ZenDiscovery ]
[node-1] failed to send join request to master
[{node-2}{UNxVYf5mQUSUV3Z9h6c7Pw}{4xJAijDHTfCNfdjyUDLvtQ}{221.128.56.131}{221.128.56.131:9302}],
reason [RemoteTransportException[[node-2][172.17.0.2:9302][internal:discovery/zen/join]];
nested: NotMasterException[Node [{node-2}{UNxVYf5mQUSUV3Z9h6c7Pw}{4xJAijDHTfCNfdjyUDLvtQ}
{221.128.56.131}{221.128.56.131:9302}] not master for join request]; ],
tried [3] times
你能帮我调试吗?