首页 > 系统相关 >Centos 9 网卡Network device is strictly unmanaged错误解决办法

Centos 9 网卡Network device is strictly unmanaged错误解决办法

时间:2022-10-18 12:03:00浏览次数:55  
标签:bridge Network Centos -- xiamingliang 网卡 NetworkManager unmanaged root

故障现象:

1.服务器无法被ping通

2.GUI界面右上角看不到网卡图标

正常情况GUI显示的网络图标:

Centos 9 网卡Network device is strictly unmanaged错误解决办法_故障

故障时网络图标消失后的样子:

Centos 9 网卡Network device is strictly unmanaged错误解决办法_device_02

3.ip addr网卡没有地址

[root@xiamingliang ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:0c:29:c1:69:35 brd ff:ff:ff:ff:ff:ff
altname enp3s0
3: br-1c57ae1d2940: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:3a:6b:40:d9 brd ff:ff:ff:ff:ff:ff
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-1c57ae1d2940
valid_lft forever preferred_lft forever
……

3.nmcli device status状态为unmanaged

[root@xiamingliang ~]# nmcli device status 
DEVICE TYPE STATE CONNECTION
br-1c57ae1d2940 bridge unmanaged --
br-37a032e957ba bridge unmanaged --
br-b365648bec89 bridge unmanaged --
docker0 bridge unmanaged --
ens160 ethernet unmanaged --
veth5707956 ethernet unmanaged --
vethfce698f ethernet unmanaged --
lo loopback unmanaged --
[root@OpenKM ~]#

4.nmcli connection show状态为unmanaged

[root@xiamingliang ~]# nmcli connection show 
NAME UUID TYPE DEVICE
ens160 cf32e4bc-eaf9-3db0-98bb-2879bd5153d8 ethernet --
[root@xiamingliang ~]#

5.尝试修复,出现device is strictly unmanaged报错

[root@xiamingliang ~]# nmcli connection up ens160 
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
[root@xiamingliang ~]#

[root@OpenKM ~]# nmcli device up ens160
Error: Failed to add/activate new connection: Connection 'ens160' is not available on device ens160 because device is strictly unmanaged
[root@xiamingliang ~]#
[root@xiamingliang ~]# nmcli device set ens160 managed yes 
[root@xiamingliang ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
br-1c57ae1d2940 bridge unmanaged --
br-37a032e957ba bridge unmanaged --
br-b365648bec89 bridge unmanaged --
docker0 bridge unmanaged --
ens160 ethernet unmanaged --
veth1ea0122 ethernet unmanaged --
veth5707956 ethernet unmanaged --
lo loopback unmanaged --
[root@OpenKM ~]#

尝试restart和reload NetworkManager.service均无效

[root@xiamingliang ~]# systemctl reload NetworkManager.service 
[root@xiamingliang ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
br-1c57ae1d2940 bridge unmanaged --
br-37a032e957ba bridge unmanaged --
br-b365648bec89 bridge unmanaged --
docker0 bridge unmanaged --
ens160 ethernet unmanaged --
veth5707956 ethernet unmanaged --
veth6817ed8 ethernet unmanaged --
lo loopback unmanaged --
[root@xiamingliang ~]#

解决办法:

我的环境解决办法是:

//确定NetworkManager是否已接管了系统的网络连接管理
[root@xiamingliang ~]# nmcli networking
disabled
[root@xiamingliang ~]#

//若没有解决则需要手动开启接管
[root@xiamingliang ~]# nmcli networking on
[root@xiamingliang ~]#

//接管后恢复正常
[root@xiamingliang ~]# nmcli connection show
NAME UUID TYPE DEVICE
ens160 cf32e4bc-eaf9-3db0-98bb-2879bd5153d8 ethernet ens160
[root@xiamingliang ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
ens160 ethernet connected ens160
docker0 bridge connected (externally) docker0
br-1c57ae1d2940 bridge disconnected --
br-37a032e957ba bridge disconnected --
br-b365648bec89 bridge disconnected --
veth5707956 ethernet unmanaged --
veth6df1eb1 ethernet unmanaged --
lo loopback unmanaged --
[root@xiamingliang ~]#

可能的其他解决方法:

或者也可以修改NetworkManager.service配置文件后再重启服务解决;配置文件路径是:/var/lib/NetworkManager/NetworkManager.state

[root@xiamingliang ~]# cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
[root@xiamingliang ~]#

注意:操作顺序先stop服务,再修改配置文件;最后启动服务。

[root@xiamingliang ~]# systemctl stop NetworkManager
[root@xiamingliang ~]# vi /var/lib/NetworkManager/NetworkManager.state
[root@xiamingliang ~]# cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true //修改为true
WirelessEnabled=true
WWANEnabled=true
[root@xiamingliang ~]# systemctl start NetworkManager
[root@xiamingliang ~]#

故障原因:

未知系统原因导致NetworkManager没有正确接管系统的网络连接管理;其实,没有调整过NetworkManager配置的情况下重启服务器也是可以解决的,但是极端情况下要避免服务器的重启操作,这个方法会很有效。



本文一来分享一些技术问题的解决方法;二来也作为自己的经历记录;希望可以帮到更多有需要的人。

标签:bridge,Network,Centos,--,xiamingliang,网卡,NetworkManager,unmanaged,root
From: https://blog.51cto.com/mlxia/5765714

相关文章

  • centos7离线安装Jenkins-rpm方式
    Jenkins有多种安装方式,下面通过rpm进行安装前提:Java的jdk已安装一、下载Jenkins的rpm包下载地址:https://jenkins.io/zh/download/或者https://mirrors.tuna.tsinghua.edu......
  • CentOS静态ip设置
    进入虚拟网络编辑器,记住当前网关然后配置静态ip地址:vim/etc/sysconfig/network-scripts/ifcfg-ens33默认的网卡信息如下:TYPE="Ethernet"#网卡类型:这里默认是......
  • centos7安装redis6.2
    一、下载安装包[root@glusterfs03~]#wgethttps://download.redis.io/releases/redis-6.2.7.tar.gz--2022-10-1810:35:21--https://download.redis.io/releas......
  • Interpreting and Unifying Graph Neural Networks with An Optimization Framework
    目录概符号说明统一的框架Graph-LF/HFZhuM.,WangX.,ShiC.,JiH.andCuiP.Interpretingandunifyinggraphneuralnetworkswithanoptimizationframework.......
  • Centos系统如何开启关闭防火墙
    一、关闭防火墙关闭防火墙的操作要根据操作系统不同,分别执行不同的操作指令关闭防火墙,具体命令如下:Centos6系统:serviceiptablesstopCentos7系统:systemctlstopfirewalld.......
  • CentOs安装docker
    CentOs安装docker目录CentOs安装docker安装docker1、环境准备:linuxcentOS3.10版本及以上2、卸载(可选)3、需要的安装包4、设置镜像的仓库(推荐阿里云)5、安装dockerdock......
  • CentOS — 安装 Docker
    文章目录一、简介二、安装三、启动四、配置镜像加速器一、简介Docker从17.03版本之后分为CE(CommunityEdition)社区版和EE(EnterpriseEdition)企业版。社区版免费,支持......
  • 第三方的镜像站中均已移除CentOS 8的源,Centos 8版本已停止更新相应依赖导致的,下载新的
    yum命令失败:Errorsduringdownloadingmetadataforrepository'epel':-Statuscode:404forhttp://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86......
  • 实验-Linux添加磁盘分区挂载以及CentOS下的文件系统
    概览实验项目名称CentOS7下的文件系统实验时间2022年10月17日实验类型□验证性□设计性□综合性一、实验目的1.掌握在虚拟机中......
  • Centos 6下安装oracle 19c报错解决
    环境:Os:Centos6.9DB:19.3.0.0 报错误1.:/lib64/libc.so.6:version`GLIBC_2.14'notfound解决办法,升级glibc:https://www.cnblogs.com/hxlasky/p/16779047.html ......