gpt4 book ai didi

Elasticsearch 集群健康与猫分配 IP 地址

转载 作者:行者123 更新时间:2023-12-02 23:34:39 24 4
gpt4 key购买 nike

当我做 _cluster/health我得到以下信息(为了清楚起见,缩写):

"nodes": {
"0KSzdqFERwaOyuqZ4oJwMA": {
"name": "Index3",
"transport_address": "inet[/172.16.120.113:9300]",
"attributes": {}
},
"IkaQ9UOXRpqnvdnkQLXVAA": {
"name": "Index4",
"transport_address": "inet[/172.16.120.114:9300]",
"attributes": {}
}
}

现在当我添加第三个节点时, _cluster/health看起来像这样:
"nodes": {
"0KSzdqFERwaOyuqZ4oJwMA": {
"name": "Index3",
"transport_address": "inet[/172.16.120.113:9300]",
"attributes": {}
},
"IkaQ9UOXRpqnvdnkQLXVAA": {
"name": "Index4",
"transport_address": "inet[/172.16.120.114:9300]",
"attributes": {}
},
"U_XMvuwNTDqspzYAJlEm4w": {
"name": "Index5",
"transport_address": "inet[/172.16.120.115:9300]",
"attributes": {}
}
}

但是当我做 _cat/allocation我看到以下内容:
27 42.3gb 17.6gb 59.9gb 70 INDEX3 172.16.120.113 Index3 
27 39.3gb 20.6gb 59.9gb 65 INDEX4 172.16.120.114 Index4
27 39.5gb 20.4gb 59.9gb 67 INDEX5 169.254.20.178 Index5

_cat/shards 下Index3 正在尝试将一些分片移动到该 169.254.20.178 上的 Index5 节点。地址并卡在那里。 _cluster/health表明集群是绿色的,但分片重新分配从未完成。

我尝试设置 network.host 但问题仍然存在:
network.host: 172.16.120.115

有人可以解释这是在哪里/为什么/如何发生的吗? _cat\allocation 如何/为什么接机 169.254.20.178 ?

安装程序在带有 elasticsearch 1.1.1 的 Windows Server 2008R2 上运行。

更新 1

这里是 ipconfig /all :
Windows IP Configuration

Host Name . . . . . . . . . . . . : SOMEHOSTNAME
Primary Dns Suffix . . . . . . . : dfw.intensive.int
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dfw.intensive.int
intensive.int
sat.intensive.int
iad.intensive.int
ord.intensive.int
lon.intensive.int
hkg.intensive.int
syd.intensive.int

Ethernet adapter Local Area Connection* 9:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter
Physical Address. . . . . . . . . : 7A-2B-CB-33-9B-BB
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::782b:cbff:fe33:9bbb%16(Preferred)
IPv4 Address. . . . . . . . . . . : 169.254.20.178(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 460991435
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-95-67-50-78-2B-CB-33-9B-BF
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter PublicNetTeam:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : BASP Virtual Adapter
Physical Address. . . . . . . . . : 78-2B-CB-33-9B-BB
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.16.120.219(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.120.1
DNS Servers . . . . . . . . . . . : >>MASKED<<
>>MASKED<<
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter BackupNet:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #33
Physical Address. . . . . . . . . : 78-2B-CB-33-9B-BF
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.241.216.69(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.224
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Heartbeat2:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #34
Physical Address. . . . . . . . . : 78-2B-CB-33-9B-C1
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.10.10.4(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled

以及节点启动时来自 elasticsearch.log 的信息。如您所见,它与 172.16.120.115 绑定(bind)。 .
[2015-09-15 15:12:58,510][INFO ][node                     ] [Index5] version[1.1.1], pid[2436], build[f1585f0/2014-04-16T14:27:12Z]
[2015-09-15 15:12:58,510][INFO ][node ] [Index5] initializing ...
[2015-09-15 15:12:58,526][INFO ][plugins ] [Index5] loaded [], sites []
[2015-09-15 15:13:02,395][INFO ][node ] [Index5] initialized
[2015-09-15 15:13:02,395][INFO ][node ] [Index5] starting ...
[2015-09-15 15:13:03,362][INFO ][transport ] [Index5] bound_address {inet[/172.16.120.115:9300]}, publish_address {inet[/172.16.120.115:9300]}
[2015-09-15 15:13:07,060][INFO ][cluster.service ] [Index5] detected_master [Index4][IkaQ9UOXRpqnvdnkQLXVAA][647264-INDEX4][inet[/172.16.120.114:9300]], added {[Index3][0KSzdqFERwaOyuqZ4oJwMA][INDEX3][inet[/172.16.120.113:9300]],[Index4][IkaQ9UOXRpqnvdnkQLXVAA][INDEX4][inet[/172.16.120.114:9300]],}, reason: zen-disco-receive(from master [[Index4][IkaQ9UOXRpqnvdnkQLXVAA][INDEX4][inet[/172.16.120.114:9300]]])
[2015-09-15 15:13:07,278][INFO ][discovery ] [Index5] elasticsearch/U_XMvuwNTDqspzYAJlEm4w
[2015-09-15 15:13:08,152][INFO ][http ] [Index5] bound_address {inet[/172.16.120.115:9200]}, publish_address {inet[/172.16.120.115:9200]}
[2015-09-15 15:13:08,152][INFO ][node ] [Index5] started

令人难以置信的是我可以在 http://172.16.120.115:9200 上发出请求我得到了回复,但是执行分片重新分配的模块似乎正在获取 local link知识产权。
curl http://172.16.120.115:9200/_cluster/health?pretty
{
"cluster_name": "elasticsearch",
"status": "green",
"timed_out": false,
"number_of_nodes": 3,
"number_of_data_nodes": 3,
"active_primary_shards": 27,
"active_shards": 54,
"relocating_shards": 2,
"initializing_shards": 0,
"unassigned_shards": 0
}

curl http://172.16.120.115:9200/_cat/shards
logindex_r210 1 r RELOCATING 240670 104.2mb 172.16.120.114 Index4 -> 169.254.20.178 Index5
logindex_r210 1 p STARTED 240670 104.2mb 172.16.120.113 Index3
logindex_r210 2 p STARTED 240747 106.4mb 172.16.120.114 Index4
logindex_r210 2 r STARTED 240747 106.4mb 172.16.120.113 Index3
companyindex_r210 4 p STARTED 394869 52.6mb 172.16.120.114 Index4
companyindex_r210 4 r STARTED 394869 52.6mb 172.16.120.113 Index3
companyindex_r210 0 p STARTED 395000 62.6mb 172.16.120.114 Index4
companyindex_r210 0 r RELOCATING 395000 52.7mb 172.16.120.113 Index3 -> 169.254.20.178 Index5

最佳答案

169.254.0.0 范围内的 IP 地址是标准的“本地链接” block 。如 RFC3927 中所述,它被分配用于单个链接上的主机之间的通信。主机通过自动配置获取这些地址,例如在找不到 DHCP 服务器时。
因此,您的节点看起来 1) 没有配置静态 IP 地址,2) 无法从 DHCP 服务器获取一个,因此它在 169.254 范围内组成了自己的 IP 地址,因此它可以在网络上通信。
您可能需要修复此问题,以便继续进行分片分配。您的节点无法获得 IP 地址这一事实很可能是重定位卡住的原因。

关于Elasticsearch 集群健康与猫分配 IP 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32595244/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com