2016-02-13 59 views
0

我想通過使用uni cast的windows計算機設置ES集羣。我想我已經完成了所有必要的配置更改,但是我的ES節點仍然沒有形成羣集。請有人讓我知道我缺少的東西。請在下面找到我的elasticseach.yml配置彈性搜索節點沒有形成集羣

=======Noed 8======= 
    cluster.name: elasticsearch 
    node.name: NODE8 
    node.data: true 
    network.host: "10.249.167.8" 
    network.publish_host: "10.249.167.8" 
    network.bind: "10.249.167.8" 
    discovery.zen.ping.multicast.enabled: false 
    discovery.zen.ping.unicast.hosts: ["10.249.167.9", "10.249.167.10", "10.249.167.8"] 

    transport.tcp.port: 9300 

=======Node9 Config======== 
cluster.name: elasticsearch 
node.name: NODE9 
node.data: true 
network.host: "10.249.167.9" 
network.publish_host: "10.249.167.9" 
network.bind: "10.249.167.9" 
discovery.zen.ping.multicast.enabled: false 

discovery.zen.ping.unicast.hosts: ["10.249.167.9", "10.249.167.10", "10.249.167.8"] 

transport.tcp.port: 9300 

I can query both ES node individually, but they dont form cluster 

Node 8 Get : http://10.249.167.8:9200/_cat/nodes?h=ip,port,heapPercent,name 
10.249.167.8 9300 2 Cecilia Reyes 

Node 9 Get : http://10.249.167.9:9200/_cat/nodes?h=ip,port,heapPercent,name 
10.249.167.9 9300 9 Victorius 

Following are the startup logs, any help would be appreciated a ton, I am stuck on this for a while now:(
[2016-02-13 01:08:06,395][WARN ][bootstrap ] unable to install syscall filter: syscall filtering not supported for OS: 'Windows Server 2012 R2' 
[2016-02-13 01:08:06,645][INFO ][node ] [NODE8] version[2.1.1], pid[7628], build[40e2c53/2015-12-15T13:05:55Z] 
[2016-02-13 01:08:06,645][INFO ][node ] [NODE8] initializing ... 
[2016-02-13 01:08:07,020][INFO ][plugins ] [NODE8] loaded [cloud-azure], sites [] 
[2016-02-13 01:08:07,051][INFO ][env ] [NODE8] using [1] data paths, mounts [[(C:)]], net usable_space [94.6gb], net total_space [126.6gb], spins? [unknown], types [NTFS] 
[2016-02-13 01:08:09,170][INFO ][node ] [NODE8] initialized 
[2016-02-13 01:08:09,170][INFO ][node ] [NODE8] starting ... 
[2016-02-13 01:08:09,357][INFO ][transport ] [NODE8] publish_address {10.249.167.8:9300}, bound_addresses {10.249.167.8:9300} 
[2016-02-13 01:08:09,373][INFO ][discovery ] [NODE8] elasticsearch/i42Qv-qNSJaSoLRCt2e5tg 
[2016-02-13 01:08:13,936][INFO ][cluster.service ] [NODE8] new_master {NODE8}{i42Qv-qNSJaSoLRCt2e5tg}{10.249.167.8}{10.249.167.8:9300}, reason: zen-disco-join(elected_as_master, [0] joins received) 
[2016-02-13 01:08:13,983][INFO ][http ] [NODE8] publish_address {10.249.167.8:9200}, bound_addresses {10.249.167.8:9200} 
[2016-02-13 01:08:13,983][INFO ][node ] [NODE8] started 
[2016-02-13 01:08:16,715][INFO ][gateway ] [NODE8] recovered [1] indices into cluster_state 

Node 9 Log======================================================================== 

[2016-02-13 01:08:44,988][WARN ][bootstrap ] unable to install syscall filter: syscall filtering not supported for OS: 'Windows Server 2012 R2' 
[2016-02-13 01:08:45,237][INFO ][node ] [NODE9] version[2.1.1], pid[6468], build[40e2c53/2015-12-15T13:05:55Z] 
[2016-02-13 01:08:45,237][INFO ][node ] [NODE9] initializing ... 
[2016-02-13 01:08:45,601][INFO ][plugins ] [NODE9] loaded [cloud-azure], sites [] 
[2016-02-13 01:08:45,625][INFO ][env ] [NODE9] using [1] data paths, mounts [[(C:)]], net usable_space [113.6gb], net total_space [126.6gb], spins? [unknown], types [NTFS] 
[2016-02-13 01:08:47,554][INFO ][node ] [NODE9] initialized 
[2016-02-13 01:08:47,554][INFO ][node ] [NODE9] starting ... 
[2016-02-13 01:08:47,753][INFO ][transport ] [NODE9] publish_address {10.249.167.9:9300}, bound_addresses {10.249.167.9:9300} 
[2016-02-13 01:08:47,763][INFO ][discovery ] [NODE9] elasticsearch/ys7WjfT3QR2DqwLFr-m6Ew 
[2016-02-13 01:08:52,292][INFO ][cluster.service ] [NODE9] new_master {NODE9}{ys7WjfT3QR2DqwLFr-m6Ew}{10.249.167.9}{10.249.167.9:9300}, reason: zen-disco-join(elected_as_master, [0] joins received) 
[2016-02-13 01:08:52,342][INFO ][http ] [NODE9] publish_address {10.249.167.9:9200}, bound_addresses {10.249.167.9:9200} 
[2016-02-13 01:08:52,342][INFO ][node ] [NODE9] started 
[2016-02-13 01:08:53,649][INFO ][gateway ] [NODE9] recovered [0] indices into cluster_state 

回答

0

該問題看起來像裂腦問題。

這意味着節點被分開並作爲主站自己。

從您的日誌中可以清楚地看到,您的節點從字面上創建了兩個不同的羣集。

避免腦裂,可能的方法是 提最小主節點

discovery.zen.minimum_master_nodes 

可以計算通過使用以下計算

minimum master node = (N/2)+1 

其中N是節點

的數

例如,如果您的羣集中有3個節點,則可以將其設置爲

discovery.zen.minimum_master_nodes: 2