RTNETLINK answers: File exists when executing 'service network restart'

23,172

Could it simply be a typo? Can you try to turn SALVE into SLAVE for eth0?

Share:
23,172

Related videos on Youtube

Lukasz
Author by

Lukasz

Updated on September 18, 2022

Comments

  • Lukasz
    Lukasz almost 2 years

    Executing either command:

    sudo service network restart
    sudo ifup bond0
    

    Results in the following error (and this is the only error):

    Bringing up interface eth0:  RTNETLINK answers: File exists
    

    Here's the config for the involved interfaces:

    DEVICE="bond0"
    IPADDR="10.100.48.6"
    NETMASK="255.255.254.0"
    ONBOOT="yes"
    
    DEVICE="eth0"
    MASTER="bond0"
    SALVE="yes"
    HWADDR="78:2B:CB:57:B5:B3"
    NM_CONTROLLED="no"
    ONBOOT="yes"
    
    DEVICE="eth4"
    MASTER="bond0"
    SLAVE="yes"
    HWADDR="00:1B:21:C9:F4:54"
    NM_CONTROLLED="no"
    ONBOOT="yes"
    

    The dmesg output suggests eth0 is not ready when bonding driver tries to enslave it:

    dmesg | egrep '(eth0)|(bond0)'
    bnx2 0000:01:00.0: eth0: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found
    at mem d4000000, IRQ 36, node addr 78:2b:cb:57:b5:b3
    ADDRCONF(NETDEV_UP): bond0: link is not ready
    bnx2 0000:01:00.0: eth0: using MSIX
    ADDRCONF(NETDEV_UP): eth0: link is not ready
    bonding: bond0: Adding slave eth4.
    bonding: bond0: enslaving eth4 as a backup interface with a down link.
    bnx2 0000:01:00.0: eth0: NIC Copper Link is Up, 100 Mbps full duplex
    ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    bond0: link status definitely up for interface eth4, 100 Mbps full duplex.
    bonding: bond0: making interface eth4 the new active one.
    bonding: bond0: first active interface up!
    ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
    

    If network services are stopped the routing table is empty (command route shows no routes). The eth0 interface can be manually enslaved after bond0 is up it will be chosen as primary and the I can ping devices in the network.

    • Admin
      Admin over 12 years
      The RTNETLINK answers: File exists usually indicates that a route already exists and you are trying to add it again. Are you doing anything to clear your existing config before running ifup? With the network in a stopped/down state is your routing table empty?
    • Admin
      Admin over 12 years
      I cannot fully stop the network right now as the machine is remote. When I ifdown bond0 interface the routing table is is empty of the routes relating to to bond0. Eth3 is the network I use to access the machine but that is on another subnet. I've added the output with bond0 down to the main question.
    • Admin
      Admin over 12 years
      Can you possibly setup a VM with an identical network configuration and test then? That is generally what I do when I need to try out networking stuff before I break a remote system.
    • Admin
      Admin over 12 years
      I've got a remote console access to the machine now - I will try your suggestions shortly.
    • Admin
      Admin over 12 years
      From what I see there is an issue with eth0 being ready when bond0 goes up. I will update the main question right away.
    • Admin
      Admin over 12 years
      I did a network restart from remote console and while the error persists the bonding driver now enslaves and uses eth0. I did nothing to it. Confusing Linux is Confusing.
    • Admin
      Admin about 12 years
      Run it in debug mode to see what condition throw that message: sh -x /etc/init.d/network restart.
    • Admin
      Admin almost 12 years
      is the typo (SALVE= instead of SLAVE=) present in your original config as well ?