Errors setting um WeaveNet in Kubernetes with "peer names collision"

6/13/2018

i am setting up a Kubernetes-Cluser and can't get the weave network up properly.

I have 3 nodes: rowlf (master), rizzo and fozzie. The pods are looking fine:

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

But weave status showing up failures:

$ 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

First I do not undestand why the connection is marked as failed. Second in the logs i found these two lines:

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

The second misunderstood thing is the "peer names collision" error. Is this normal?

This is the log from "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

I ask, because i reinstall everything from scratch the fourth time by now and every time I have some trouble to connect from traefik to a pod on another host. I blame the network, because this does not look health. Can you please tell me if the setup is correct so far. Are the errors normal or do I have to care about them? And finally: how do I request for help and what information do I have to provide to make it some people like you easy to help me out of this frustrating position?

This is my version:

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"}

Thank you.

++++ UPDATE ++++ I reset the machine-id like it is mentiond in here: https://github.com/weaveworks/weave/issues/2767 But this cause a constantly reboot of my machines!

kernel:[ 2257.674153] Internal error: Oops: 80000007 [#1] SMP ARM
-- Peter Shaw
kubernetes
traefik

1 Answer

6/13/2018

Finally I found the solution here: https://github.com/weaveworks/weave/issues/3314 We have to disable fastDP!

-- Peter Shaw
Source: StackOverflow