zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    如何提高逻辑思维的能力 思维的层次 逻辑思维能力练习方式
    淘宝JAVA中间件Diamond详解之简介&快速使用 管理持久配置的系统
    java 取模运算% 实则取余 简述 例子 应用在数据库分库分表
    SpringMVC+Spring+mybatis项目从零开始--Spring mybatis mysql配置实现
    SpringMVC+Spring+mybatis项目从零开始--分布式项目结构搭建
    JS密码校验规则前台验证(不能连续字符(如123、abc)连续3位或3位以上)(不能相同字符(如111、aaa)连续3位或3位以上)
    12 个非常实用的 jQuery 代码片段
    html增加和删除div
    css改变hr颜色
    jquery怎么在点击li标签之后添加一个在class,点击下一个li时删除上一个class?
  • 原文地址:https://www.cnblogs.com/PiscesCanon/p/14519217.html
Copyright © 2011-2022 走看看