我正在设置Kubernetes-Cluser,无法正确设置weave网络。
我有3个节点: rowlf (master),rizzo和fozzie。pods看起来很好:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/etcd-rowlf 1/1 Running 0 32m
kube-system pod/kube-apiserver-rowlf 1/1 Running 9 33m
kube-system pod/kube-controller-manager-rowlf 1/1 Running 0 32m
kube-system pod/kube-dns-686d6fb9c-kjdxt 3/3 Running 0 33m
kube-system pod/kube-proxy-6kpr9 1/1 Running 0 9m
kube-system pod/kube-proxy-f7nk5 1/1 Running 0 33m
kube-system pod/kube-proxy-nrbbl 1/1 Running 0 21m
kube-system pod/kube-scheduler-rowlf 1/1 Running 0 32m
kube-system pod/weave-net-4sj4n 2/2 Running 1 21m
kube-system pod/weave-net-kj6q7 2/2 Running 1 9m
kube-system pod/weave-net-nsp22 2/2 Running 0 30m
但编织状态显示失败:
$ kubectl exec -n kube-system weave-net-nsp22 -c weave -- /home/weave/weave --local status
Version: 2.3.0 (up to date; next check at 2018/06/14 00:30:09)
Service: router
Protocol: weave 1..2
Name: 7a:8f:22:1f:0a:17(rowlf)
Encryption: disabled
PeerDiscovery: enabled
Targets: 1
Connections: 1 (1 failed)
Peers: 1
TrustedSubnets: none
Service: ipam
Status: ready
Range: 10.32.0.0/12
DefaultSubnet: 10.32.0.0/12
首先,我不明白为什么连接被标记为失败。其次,在日志中,我发现了这两行:
INFO: 2018/06/13 17:22:59.170536 ->[172.16.20.12:54077] connection accepted
INFO: 2018/06/13 17:22:59.480262 ->[172.16.20.12:54077|7a:8f:22:1f:0a:17(rowlf)]: connection shutting down due to error: local "7a:8f:22:1f:0a:17(rowlf)" and remote "7a:8f:22:1f:0a:17(rizzo)" peer names collision
INFO: 2018/06/13 17:34:12.668693 ->[172.16.20.13:52541] connection accepted
INFO: 2018/06/13 17:34:12.672113 ->[172.16.20.13:52541|7a:8f:22:1f:0a:17(rowlf)]: connection shutting down due to error: local "7a:8f:22:1f:0a:17(rowlf)" and remote "7a:8f:22:1f:0a:17(fozzie)" peer names collision
第二个被误解的事情是“对等名称冲突”错误。这是正常的吗?
这是来自"rizzo“的日志
kubectl logs weave-net-4sj4n -n kube-system weave
DEBU: 2018/06/13 17:22:58.731864 [kube-peers] Checking peer "7a:8f:22:1f:0a:17" against list &{[{7a:8f:22:1f:0a:17 rowlf}]}
INFO: 2018/06/13 17:22:58.833350 Command line options: map[conn-limit:100 docker-api: host-root:/host http-addr:127.0.0.1:6784 ipalloc-range:10.32.0.0/12 no-dns:true expect-npc:true name:7a:8f:22:1f:0a:17 datapath:datapath db-prefix:/weavedb/weave-net ipalloc-init:consensus=2 metrics-addr:0.0.0.0:6782 nickname:rizzo port:6783]
INFO: 2018/06/13 17:22:58.833525 weave 2.3.0
INFO: 2018/06/13 17:22:59.119956 Bridge type is bridged_fastdp
INFO: 2018/06/13 17:22:59.120025 Communication between peers is unencrypted.
INFO: 2018/06/13 17:22:59.141576 Our name is 7a:8f:22:1f:0a:17(rizzo)
INFO: 2018/06/13 17:22:59.141787 Launch detected - using supplied peer list: [172.16.20.12 172.16.20.11]
INFO: 2018/06/13 17:22:59.141894 Checking for pre-existing addresses on weave bridge
INFO: 2018/06/13 17:22:59.157517 [allocator 7a:8f:22:1f:0a:17] Initialising with persisted data
INFO: 2018/06/13 17:22:59.157884 Sniffing traffic on datapath (via ODP)
INFO: 2018/06/13 17:22:59.158806 ->[172.16.20.11:6783] attempting connection
INFO: 2018/06/13 17:22:59.159081 ->[172.16.20.12:6783] attempting connection
INFO: 2018/06/13 17:22:59.159815 ->[172.16.20.12:42371] connection accepted
INFO: 2018/06/13 17:22:59.161572 ->[172.16.20.12:6783|7a:8f:22:1f:0a:17(rizzo)]: connection shutting down due to error: cannot connect to ourself
INFO: 2018/06/13 17:22:59.161836 ->[172.16.20.12:42371|7a:8f:22:1f:0a:17(rizzo)]: connection shutting down due to error: cannot connect to ourself
INFO: 2018/06/13 17:22:59.265736 Listening for HTTP control messages on 127.0.0.1:6784
INFO: 2018/06/13 17:22:59.266483 Listening for metrics requests on 0.0.0.0:6782
INFO: 2018/06/13 17:22:59.443937 ->[172.16.20.11:6783|7a:8f:22:1f:0a:17(rizzo)]: connection shutting down due to error: local "7a:8f:22:1f:0a:17(rizzo)" and remote "7a:8f:22:1f:0a:17(rowlf)" peer names collision
INFO: 2018/06/13 17:23:00.355761 [kube-peers] Added myself to peer list &{[{7a:8f:22:1f:0a:17 rowlf}]}
DEBU: 2018/06/13 17:23:00.367309 [kube-peers] Nodes that have disappeared: map[]
INFO: 2018/06/13 17:34:12.671287 ->[172.16.20.13:60523] connection accepted
INFO: 2018/06/13 17:34:12.674712 ->[172.16.20.13:60523|7a:8f:22:1f:0a:17(rizzo)]: connection shutting down due to error: local "7a:8f:22:1f:0a:17(rizzo)" and remote "7a:8f:22:1f:0a:17(fozzie)" peer names collision
我之所以这样问,是因为我现在第四次从头开始重新安装所有东西,每次从traefik连接到另一台主机上的pod时都会遇到问题。我责怪网络,因为这看起来不健康。你能告诉我到目前为止设置是否正确吗?这些错误是正常的,还是我必须关心它们?最后:我如何请求帮助,我必须提供什么信息,才能让像你这样的人很容易地帮助我走出这个令人沮丧的境地?
这是我的版本:
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-04-27T09:22:21Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/arm"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4", GitCommit:"5ca598b4ba5abb89bb773071ce452e33fb66339d", GitTreeState:"clean", BuildDate:"2018-06-06T08:00:59Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/arm"}
谢谢。
++++ UPDATE ++++我重置了机器id,就像这里提到的:https://github.com/weaveworks/weave/issues/2767,但这会导致我的机器不断地重启!
kernel:[ 2257.674153] Internal error: Oops: 80000007 [#1] SMP ARM
发布于 2018-06-14 05:06:49
最后我在这里找到了解决方案:https://github.com/weaveworks/weave/issues/3314我们必须禁用fastDP!
发布于 2020-09-05 05:13:34
我遇到了同样的问题,禁用fastDP对我不起作用,但我发现原因是所有节点的/etc/machine-id
值都相同,这是我从相同的操作系统映像克隆它们的结果。
我从所有节点中删除了机器ID,并使用以下命令生成了新的ID:
sudo rm /etc/machine-id
sudo systemd-machine-id-setup
然后重置我的集群
发布于 2021-08-20 02:48:22
‘'sudo systemd- machine-id -setup’为我生成作为旧机器id的机器id。我只需编辑机器id,它就可以工作了。
https://stackoverflow.com/questions/50843411
复制相似问题