centos7 网卡启动不了,修复方法

news/2024/12/29 16:29:38/

刚刚装好的虚拟机突然不能上网了,报错很诡异,具体报错如下:

/etc/init.d/network restart

Restarting network (via systemctl):  Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

[失败]

使用systemctl status network.service命令查看结果如下:

network.service - LSB: Bring up/down networking

Loaded: loaded (/etc/rc.d/init.d/network)

Active: failed (Result: exit-code) since 三 2016-08-17 11:34:36 CST; 54s ago

Docs: man:systemd-sysv-generator(8)

Process: 3847 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists

8月 17 11:34:36 python.cn systemd[1]: network.service: control process exited, code=exited status=1

8月 17 11:34:36 python.cn systemd[1]: Failed to start LSB: Bring up/down networking.

8月 17 11:34:36 python.cn systemd[1]: Unit network.service entered failed state.

8月 17 11:34:36 python.cn systemd[1]: network.service failed.

查看系统日志,报错如下:

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python network: RTNETLINK answers: File exists

Aug 17 11:34:36 python systemd: network.service: control process exited, code=exited status=1

Aug 17 11:34:36 python systemd: Failed to start LSB: Bring up/down networking.

Aug 17 11:34:36 python systemd: Unit network.service entered failed state.

Aug 17 11:34:36 python systemd: network.service failed.

Aug 17 11:36:28 python systemd: Starting LSB: Bring up/down networking...

Aug 17 11:36:29 python network: 正在打开环回接口: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'

Aug 17 11:36:29 python network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'

Aug 17 11:36:29 python network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'

Aug 17 11:36:29 python network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'

Aug 17 11:36:29 python network: [  确定  ]

Aug 17 11:36:29 python network: 正在打开接口 eno16777736: 错误:激活连接失败:No suitable device found for this connection.

经查,确认/etc/sysconfig/network-scripts/ifcfg-lo文件是存在的。问题出现在哪里呢?无法,只好百度一下吧,百度出来的结果竟然基本一样。

百度答案:

mac地址不对,修改mac地址。

也许有人确实是mac问题,但是莫名其妙怎么可能mac地址更改了,除非你添加新网卡或者克隆的虚拟机。

我特么真笑了,天下百度文章一大抄啊。。。。。。。。

没办法了,Google一下吧,偶然看到一个文章,大意是跟系统自带的NetworkManager这个管理套件有关系,关掉就可以解决。

试一下:

systemctl stop NetworkManager

systemctl disable NetworkManager

Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.

Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.

Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.

重新启动网络:

systemctl start network.service

ifconfig |grep eno

eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

inet 192.168.1.192  netmask 255.255.255.0  broadcast 192.168.1.255

inet6 fe80::20c:29ff:fe3d:b305  prefixlen 64  scopeid 0x20<link>

ether 00:0c:29:3d:b3:05  txqueuelen 1000  (Ethernet)

RX packets 2  bytes 120 (120.0 B)

RX errors 0  dropped 0  overruns 0  frame 0

TX packets 22  bytes 3551 (3.4 KiB)

TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

网络正常启动,访问正常。


http://www.ppmy.cn/news/362585.html

相关文章

Discovering versions from the identity service failed when creating the password plugin. Attempting

报错信息&#xff1a; [rootcontroller keystone]# openstack user show admin Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL. Unable to establish connection to http://controll…

(一)Open Stack(M)----基础环境搭建

感谢指剑大佬发表的博客与视频&#xff01;感谢所 爱大佬的支持&#xff01; Open Stack简介 1.虚拟机配置 一般都是要求每个节点都是4核4G&#xff0c;菜鸡我内存不足。 主机名配置网络controller4核4G192.168.100.10&#xff08;内网&#xff09;192.168.200.10&#xff…

第三方SSD问题引起电脑频繁重启问题IONVMeController.cpp:5499

电脑硬盘问题。一般第三方硬盘容易出这类问题。 固态硬盘接触不良&#xff0c;下固态硬盘&#xff0c;重新固定安装就好了。我的电脑一周出现两次这样的问题。出现这样的问题&#xff0c;可以换一个固态硬盘转接头&#xff0c;避免电脑来回移动震动电脑。 我的电脑是Macbook Ai…

基于springboot的学生选课系统

随着高校学生数量的不断增加&#xff0c;教务系统的数据量也不断增加。以前的选课方法是人工统计。这种方法虽然简单直接&#xff0c;但是造成教务处处理数据的繁重性和学生选课的盲目性。为了方便教务处的工作&#xff0c;以及每个学生能够更好的选择自己所喜欢的课程。针对学…

301、302、303、307状态码的区别

301永久重定向 302临时重定向&#xff0c;HTTP1.0的状态码&#xff0c;HTTP1.1也有保留。 如果client向server发送post请求。 server返回URL和302。 如果用户确认&#xff0c;client发送post请求。&#xff08;但实际情况是&#xff0c;很多浏览器都不问问用户&#xff0c;…

Starting network (via systemctl): Job for network.service failed because the control process exited

在构建KVM网络时遇到如下报错刚刚装好的虚拟机突然不能上网了&#xff0c;报错很诡异&#xff0c;具体报错如下&#xff1a; /etc/init.d/network restart Restarting network (via systemctl): Job for network.service failed because the control process exited with error…

ens33网卡没有IP地址的解决方案

刚刚装好的虚拟机突然不能上网了&#xff0c;报错很诡异&#xff0c;具体报错如下&#xff1a; /etc/init.d/network restart Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemc…

301与302区别

301与302区别 定义如下&#xff1a; 301 Moved Permanently 被请求的资源已永久移动到新位置&#xff0c;并且将来任何对此资源的引用都应该使用本响应返回的若干个URI之一。如果可能&#xff0c;拥有链接编辑功能的客户端应当自动把请求的地址修改为从服务器反馈回来的地址。…