部署方式: kubernetes
nebula graph 镜像版本: vesoft/nebula-metad:v2-nightly
metad 副本数: 3
问题:
当前最新版本的–meta_server_addrs 配置项是否支持域名方式。
之前使用老版本 vesoft/nebula-metad:v1.2.1 镜像是可以配置域名的,但是更新到新版本镜像后,metad服务启动有问题,raft协议选举失败。
分别为3个metad的pod创建service。
配置方式:
--meta_server_addrs=nebula-metad-olap-0.component.svc.cluster.local:44500,nebula-metad-olap-1.component.svc.cluster.local:44500,nebula-metad-olap-2.component.svc.cluster.local:44500
E0708 19:33:36.295245 52 RaftPart.cpp:1118] [Port: 44501, Space: 0, Part: 0] Receive response about askForVote from "nebula-metad-olap-1.component.svc.cluster.local":44501, error code is E_WRONG_LEADER
Sajo
2
可以填 service name,如果你是手动部署的话,记得修改 service 中的 publishNotReadyAddresses: true
1 个赞
看了之前的一个帖子,把publishNotReadyAddresses: true 配置项加了。
加改配置项后,v1.2.1的镜像是可以的,v2.0.1和v2-nigthly镜像都不可以。
v1.2.1 镜像的时候使用的是HeadLess 类型的service,也是没问题的。
apiVersion: v1
kind: Service
metadata:
labels:
app: nebula-metad
name: nebula-metad-olap
namespace: component
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: thrift
port: 44500
- name: raft
port: 44501
- name: http
port: 11000
- name: http2
port: 11002
selector:
app: nebula-metad
meta_server_addrs 是这样配置的。
--meta_server_addrs=nebula-metad-olap.component.svc.cluster.local:44500
老版本这么运行是ok的。
Sajo
4
注意下 1.x 版本 和 2.0.0 GA 之后的版本 端口号是不一样的 端口号也要修改 如果你是用 configmap 做的配置文件持久化 应该也需要更新到 2.0.0 之后的版本
好的,多谢多谢,有您确认是支持域名的就可以了,我再看看。有信息我再更新~
反馈下,问题已解决。
有问题的配置方式:
--meta_server_addrs=nebula-metad-olap-0.component.svc.cluster.local:9559,nebula-metad-olap-1.component.svc.cluster.local:9559,nebula-metad-olap-2.component.svc.cluster.local:9559
这种配置方式下,貌似是raft不认nebula-metad-olap-0这种短域名,只认配置文件中配置的ebula-metad-olap-0.component.svc.cluster.local这种全域名。报错如下:
I0709 15:39:48.632210 1 MetaDaemon.cpp:108] Leader has not been elected, sleep 1s
I0709 15:39:49.058470 45 RaftPart.cpp:1337] [Port: 9560, Space: 0, Part: 0] Recieved a VOTING request: space = 0, partition = 0, candidateAddr = nebula-metad-olap-0:9560, term = 19, lastLogId = 0, lastLogTerm = 0
I0709 15:39:49.058501 45 RaftPart.cpp:1370] [Port: 9560, Space: 0, Part: 0] The partition currently is a Candidate, lastLogId 0, lastLogTerm 0, committedLogId 0, term 0
I0709 15:39:49.058509 45 RaftPart.cpp:535] [Port: 9560, Space: 0, Part: 0] The candidate "nebula-metad-olap-0":9560 is not in my peers
没有问题的配置方式:
--meta_server_addrs=nebula-metad-olap-0:9559,nebula-metad-olap-1:9559,nebula-metad-olap-2:9559
把配置改为短域名就可以了。
1 个赞
system
关闭
7
该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。