侧边栏壁纸
博主头像
WinJay博主等级

博观而约取 厚积而薄发

  • 累计撰写 307 篇文章
  • 累计创建 165 个标签
  • 累计收到 1 条评论
隐藏侧边栏

三种方法解决 Failed to start LSB: Bring up/down networking 有关问题

WinJay
2017-04-25 / 0 评论 / 0 点赞 / 62 阅读 / 2,810 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2022-01-20,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

《—》

1、执行 service network restart 出现以下错误

Restarting network (via systemctl): Job for network.service failed. See ‘systemctl status network.service’ and ‘journalctl -xn’ for details.

2、根据上面的提示,执行“systemctl status network.service”输出以下的类似信息:
image.png

[root@WinJay]# 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 Tue 2017-04-25 10:39:45 CST; 7min ago  
Process: 1140 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Apr 25 10:39:44 Nerc.Crtvu network[1140]: Bringing up loopback interface: Could not load file ‘/etc/sysconfig/networ…fg-lo’  
Apr 25 10:39:44 Nerc.Crtvu network[1140]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’  
Apr 25 10:39:45 Nerc.Crtvu network[1140]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’  
Apr 25 10:39:45 Nerc.Crtvu network[1140]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’  
Apr 25 10:39:45 Nerc.Crtvu network[1140]: [ OK ]  
Apr 25 10:39:45 Nerc.Crtvu network[1140]: Bringing up interface eth0: Error: no device found for connection ‘eth0’.  
Apr 25 10:39:45 Nerc.Crtvu network[1140]: [FAILED]  
Apr 25 10:39:45 Nerc.Crtvu systemd[1]: **network.service: control process exited, code=exited status=1**  
Apr 25 10:39:45 Nerc.Crtvu systemd[1]: Failed to start LSB: Bring up/down networking.
Apr 25 10:39:45 Nerc.Crtvu systemd[1]: **Unit network.service entered failed state.**  
Hint: Some lines were ellipsized, use -l to show in full.


3、解决的办法(由于rhel7/centos7中没有70-persistent-net.rules这个文件,复制出来的虚拟机(vmware/Hyper-v)需要修改mac地址),就是修改mac地址。

4、如何查看centos7复制出来的虚拟机的mac地址,需要执行 “ip addr”,输出如下的类似信息:

[root@WinJay]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 00:15:5d:a1:6d:01 brd ff:ff:ff:ff:ff:ff

注意上面加粗加红的字,这就是新的mac地址。

接下来就剩下修改ifcfg-eth0文件了,只修改HWADDR就可以了。接下来执行service network restart 就正常了。

《二》

如果还是启动失败 查看是否有如下错误信息

Apr 25 11:09:07 hdcoe02 network[597]: Bringing up loopback interface: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’

Apr 25 11:09:07 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’

Apr 25 11:09:08 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’

Apr 25 11:09:08 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’ Apr 25 22:09:08 hdcoe02 network[597]: [ OK ]

Apr25 11:09:08 hdcoe02 network[597]: Bringing up interface enp0s25: Error: Connection activation failed: Connection ‘enp0s25’ is not available on the device enp0s25 at this time.

设定开机启动一个名为NetworkManager-wait-online服务,命令为:

systemctl enable NetworkManager-wait-online.service

《三》

如果上面方法都测试完了 还是不成功,查看一下在VMware /Hyper-v虚拟机里面的系统右上角显示的连接有没有连接上,虽然报错都一样,可在虚拟机设置里面将原来的网络适配器删掉,重新建了一个新的网络适配器,再次进入系统,会显示连接成功,再用上面的方法,问题解决。

0

评论区