Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

weave launch RTNETLINK answers: File exists or 'Error: either "to" is a duplicate, or "X.X.X.X" is a garbage.' #278

Closed
justionpanye opened this issue Dec 18, 2014 · 4 comments

Comments

@justionpanye
Copy link

I encountered a problem

weave on CentOS 7 is OK!
but weave doesn't seem to be able to map new Ethernet devices into containers on stock CentOS 6.X

My steps:

first step:
update centos6.6 kernel to 3.10.63-1.el6.elrepo.x86_64
update docker version to 1.3.2

second step:
when I run the command ”weave launch“,the error is like that:
[root@localhost network-scripts]# weave launch
'Error: either "to" is a duplicate, or "X.X.X.X" is a garbage.'

third step:
when I run the command ”weave launch“ again,the error is like that:
[root@localhost network-scripts]# weave launch
Failure during network configuration for container 93cd05ff965560442e7dc7f236ec668e156ff2fcd8363281c5ddaa1f68bd3b40:
No eth0 interface inside weave container; perhaps you are running the docker daemon with container networking disabled (-b=none).
error like issue #277

when I run the command ”weave reset“ and "weave launch"
the error is like that:
[root@localhost network-scripts]# weave launch
RTNETLINK answers: File exists

I read in an article:
Duplicate Default Gateways
If the default gateway is already assigned from DHCP, the IP command arguments format can cause one of two errors during start-up, or when bringing up an interface from the down state using the ifup command: "RTNETLINK answers: File exists" or 'Error: either "to" is a duplicate, or "X.X.X.X" is a garbage.', where X.X.X.X is the gateway, or a different IP address. These errors can also occur if you have another route to another network using the default gateway. Both of these errors are safe to ignore.

my centos6.6 Running in a virtual machine(vmware)

[root@localhost network-scripts]# uname -a
Linux localhost.localdomain 3.10.63-1.el6.elrepo.x86_64 #1 SMP Tue Dec 16 16:52:21 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost network-scripts]# docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa/1.3.2

[root@localhost network-scripts]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m

@rade
Copy link
Member

rade commented Dec 18, 2014

The fact that weave reset leaves you in a different state than when you started is annoying.

Can you start from scratch and this time run the weave script with

sh -x which weave launch

? That way we should be able to figure out where exactly it is tripping over.

@justionpanye
Copy link
Author

@rade :sh-4.1# sh -x weave launch

  • set -e
    ++ id -u
  • '[' 0 = 0 ']'
  • '[' 1 -gt 0 ']'
  • IMAGE=zettio/weave
  • DNS_IMAGE=zettio/weavedns
  • CONTAINER_NAME=weave
  • DNS_CONTAINER_NAME=weavedns
  • BRIDGE=weave
  • CONTAINER_IFNAME=ethwe
  • MTU=65535
  • PORT=6783
  • HTTP_PORT=6784
  • DNS_HTTP_PORT=6785
  • DOCKER_BRIDGE=docker0
  • COMMAND=launch
  • shift 1
  • uname -s -r
  • read sys maj min
  • sed -n 's|^([^ ]) ([0-9]+).([0-9]+).|\1 \2 \3|p'
  • '[' Linux '!=' Linux ']'
  • '[' '(' 3 -eq 3 -a 10 -ge 5 ')' -o 3 -gt 3 ']'
    ++ docker -v
    ++ sed -n 's|^Docker version ([0-9]+.[0-9]+.[0-9]+),.*|\1|p'
  • DOCKER_VERSION=1.4.0
  • '[' -z 1.4.0 ']'
  • '[' 1.4.0 = 1.3.0 ']'
    ++ echo 1.4.0
    ++ cut -d. -f 1
  • DOCKER_VERSION_MAJOR=1
    ++ echo 1.4.0
    ++ cut -d. -f 2
  • DOCKER_VERSION_MINOR=4
    ++ echo 1.4.0
    ++ cut -d. -f 3
  • DOCKER_VERSION_PATCH=0
  • case "$COMMAND" in
  • check_not_running weave zettio/weave
  • case $(docker inspect --format '{{ .State.Running }} {{ .Config.Image }}' $1 2>/dev/null) in
    ++ docker inspect --format '{{ .State.Running }} {{ .Config.Image }}' weave
  • create_bridge
  • '[' '!' -d /sys/class/net/weave ']'
  • ip link add name weave type bridge
    ++ tr ' ' :
    ++ od -txC -An -N5 /dev/urandom
    ++ tail -c+2
  • ip link set dev weave address 7a:ac:52:53:85:ff
  • ip link add name vethwedu mtu 65535 type dummy
  • ip link set dev vethwedu master weave
    Error: either "dev" is duplicate, or "master" is a garbage.

@rade
Copy link
Member

rade commented Dec 18, 2014

@justionpanye cheers. The error appears to be slightly different from what you posted earlier, i.e.

Error: either "dev" is duplicate, or "master" is a garbage.

instead of

Error: either "to" is a duplicate, or "X.X.X.X" is a garbage.

Any idea why?

Also, what does ip -V return?

The problem almost certainly is that your version of ip is too old; it would be good if weave was able to detect that and display a more meaningful error.

@justionpanye
Copy link
Author

@rade Update the Ip version after the weave has been good. thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants