• Linux双网卡绑定启动网卡报错Error: Connection activation failed: Master connection not found or invalid


    Linux双网卡绑定启动网卡报错Error: Connection activation failed: Master connection not found or invalid

    前言

    OS版本:Oracle Linux 6.8

    做双网卡绑定的时候,bond0配置如下:

    DEVICE=bond0
    TYPE=bond
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=192.168.180.100
    NETMASK=255.255.255.0
    GATEWAY=192.168.180.254
    USERCTL=no
    BONDING_OPTS="mode=1 miimon=100"

    eth0配置如下(eth1配置类似):

    DEVICE=eth0
    HWADDR=XX:XX:XX:XX:XX:22
    TYPE=Ethernet
    UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=none
    MASTER=bond0
    SLAVE=yes

    结果启动报错:

    [root@xxxxxxstb01 network-scripts]# ifup eth0
    Error: Connection activation failed: Master connection not found or invalid
    [root@xxxxxxstb01 network-scripts]# ifup eth1
    Error: Connection activation failed: Master connection not found or invalid
    [root@xxxxxxstb01 network-scripts]# ifup bond0
    Error: Connection activation failed: Master connection not found or invalid
    Unable to start slave device ifcfg-eth0 for master bond0.
    Error: Connection activation failed: Master connection not found or invalid
    Unable to start slave device ifcfg-eth1 for master bond0.
    Determining if ip address 192.168.180.100 is already in use for device bond0...

    网络直接断开连接不了了......

    我去,得跑机房了......

    原因

    度娘问到的:

    NetworkManager导致的(由于需要去机房才能验证,八九不离十就是这个问题了)。

    NetworkManager和network是两个不同的服务,它们是互相冲突的。最根本的解决办法就是把NetworkManager服务停掉。

    NetworkManager其实是图形界面管理工具,如果在没有安装图形界面时NetworkManager是不会安装的。

    结合mos文档(Linux OS Service 'NetworkManager' (文档 ID 560043.1)):

    Service Name

    NetworkManager

    Description

    The Service manages the NetworkManager daemon, which is part of GNOME desktop. (For Laptops and Desktops)
    Therefore it thinks that it is running on a laptop/desktop.

    With the Linux desktop, different networking factors come in like:

    • Change of networks (home, office, public etc.)
    • Wi-Fi (Wireless)
    • Dialup Networking (DUN)
    • Mobile Broadband
    • Bluetooth Dialup

    The NetworkManager can manage such dynamic networking requirements which also has a Graphical User Interface (GUI). This daemon backs the GUI.

    This software is not recommended for any Linux Servers. Linux servers don't run GNOME.
    Network Manager initially does nothing until the network state changes, (including yum update) then unless "ifcfg-*" file has "NM_CONTROLLED=NO"
    the NM will take control of the link and drop it because nobody is logged in to gnome, and take the next available network port.

    Service Management

    The service is disabled by default for Linux prior to OL 6.x.
    # chkconfig --list NetworkManager
    NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off

    You can enable the service for Linux 4 and 5 by:
    # chkconfig NetworkManager on
    # chkconfig --list NetworkManager
    NetworkManager  0:off   1:off   2:on    3:on    4:on    5:on    6:off
    #

    To start the service:
    # service NetworkManager start
    Setting network parameters...                              [  OK  ]
    Starting NetworkManager daemon:                            [  OK  ]
    #

    To stop the service:
    # service NetworkManager stop
    Stopping NetworkManager daemon:                            [  OK  ]
    #

    Nature

    Daemon

    Oracle Linux Version(s)

    • Oracle Linux 4
    • Oracle Linux 5
    • Oracle Linux 6

    Essentiality

    Not crucial for Oracle Linux 5 latest (and disabled by default). Nevertheless, this may become the standard network management service in future.
    Detrimental it Oracle Linux 6 (any release) as the software is enabled by default.
     If NetworkManager is not disabled, a cgange in status will cause the NetworkManager to take the next available network port, disabling the network for the server.
     To correct:ensure that the NM_CONTROLLED and UUID lines are removed from /etc/sysconfig/network-scripts/ unused network port ifcfg-ethx file

    暂不清楚具体原理,也没时间研究。

    由于本身服务器不安装图形化界面是没有该服务的,而且某些情况会出现问题(比如我遇到的)。

    MOS文档也指出不建议任何Linux服务器使用此软件。

    建议在Linux服务器上禁用该服务。 

    参考

    https://blog.csdn.net/jinwufeiyang/article/details/80211294

    Missing Bonding Virtual Interface After Rebooting Orcle Linux Server (文档 ID 1625976.1)

    How To Disable NetworkManager on Oracle Linux 7 (文档 ID 2501839.1)

    Linux OS Service 'NetworkManager' (文档 ID 560043.1)
    关于NetworkManager和network

  • 相关阅读:
    Django的常用方法以及配置
    orm 练习题
    Codeforces 898 贪心关闭最少闹钟 优先队列最少操作构造N/2squares 讨论情况哈希数字串分割a+b=c
    Codeforces 985 最短水桶分配 沙堆构造 贪心单调对列
    At grand 024
    Codeforces 982 树边两端点计数偶数连通块 鲨鱼活动最小K最大location 扩展欧几里得方块内光线反射
    Codeforces 984 扫雷check 欧几里得b进制分数有限小数判定 f函数最大连续子段
    Codeforces 979 字符串强制N变换最多出现字母 DFS子树 暴力01字典树
    Codeforces 899 1-N两非空集合最小差 末尾最多9对数计算 pair/链表加优先队列最少次数清空
    Atcoder Regular 097 相邻球交换目的递增DP
  • 原文地址:https://www.cnblogs.com/PiscesCanon/p/14519217.html
Copyright © 2020-2023  润新知