(转)启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结
启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结
Failed to start LSB: Bring up/down networking
遇到这个错误好几次,所以总结了一下排解的几种方法。
错误记录及排查方法过程:
当我克隆出一台新的centos7的虚拟机的时候,修改了网卡配置文件启动时,报错
1
2
3
|
[root@centos7 ~] # systemctl restart network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [root@centos7 ~] # |
按照提示输入systemctl status network.service查看
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[root@centos7 ~] # systemctl status network.service ● network.service - LSB: Bring up /down networking Loaded: loaded ( /etc/rc .d /init .d /network ; bad; vendor preset: disabled) Active: failed (Result: exit -code) since Mon 2017-03-13 23:24:37 CST; 16s ago Docs: man :systemd-sysv-generator(8) Process: 2878 ExecStart= /etc/rc .d /init .d /network start (code=exited, status=1 /FAILURE ) Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 network[2878]: RTNETLINK answers: File exists Mar 13 23:24:37 centos7 systemd[1]: network.service: control process exited, code=exited status=1 Mar 13 23:24:37 centos7 systemd[1]: Failed to start LSB: Bring up /down networking. Mar 13 23:24:37 centos7 systemd[1]: Unit network.service entered failed state. Mar 13 23:24:37 centos7 systemd[1]: network.service failed. |
无奈去百度了一下,找到解决方法,说是centos7没有70-persistent-net.rules这个文件,所以新克隆的机器需要配置mac地址。
通过ip a命令查看mac地址是00:0c:29:0c:15:49
1
2
|
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link /ether 00:0c:29:0c:15:49 brd ff:ff:ff:ff:ff:ff |
然后在配置文件中加入这一行(如果存在的话只修改就可以)
1
|
HWADDR=00:0c:29:0c:15:49 |
重启生效
1
2
3
|
[root@centos7 ~] # systemctl restart network.service Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [root@centos7 ~] # |
发现依然有这个错误
查看启动日志
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Mar 13 23:51:35 centos7 systemd: Starting LSB: Bring up /down networking... Mar 13 23:51:35 centos7 network: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Mar 13 23:51:35 centos7 network: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Mar 13 23:51:35 centos7 network: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Mar 13 23:51:35 centos7 network: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Mar 13 23:51:35 centos7 network: [ OK ] Mar 13 23:51:36 centos7 network: Bringing up interface eth0: Error: Connection activation failed: No suitable device found for this connection. Mar 13 23:51:36 centos7 network: [FAILED] Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 network: RTNETLINK answers: File exists Mar 13 23:51:36 centos7 systemd: network.service: control process exited, code=exited status=1 Mar 13 23:51:36 centos7 systemd: Failed to start LSB: Bring up /down networking. Mar 13 23:51:36 centos7 systemd: Unit network.service entered failed state. Mar 13 23:51:36 centos7 systemd: network.service failed. |
发现无法加载/etc/sysconfig/network-scripts/ifcfg-lo文件
给NetworkManager-wait-online服务设置开机自启动
1
|
systemctl enable NetworkManager-wait-online.service |
然后重启网卡
1
2
3
|
[root@centos7 ~] # systemctl restart network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [root@centos7 ~] # |
查看日志
1
|
Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' |
这个错误依然存在
1
2
|
systemctl stop NetworkManager systemctl disable NetworkManager |
将 NetworkManager关闭,然后重启网卡,查看日志
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Mar 14 00:31:27 centos7 systemd: Starting LSB: Bring up /down networking... Mar 14 00:31:27 centos7 network: Bringing up loopback interface: [ OK ] Mar 14 00:31:28 centos7 network: Bringing up interface eth0: ERROR : [ /etc/sysconfig/network-scripts/ifup-eth ] Device eth0 does not seem to be present, delaying initialization. Mar 14 00:31:28 centos7 /etc/sysconfig/network-scripts/ifup-eth : Device eth0 does not seem to be present, delaying initialization. Mar 14 00:31:28 centos7 network: [FAILED] Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 network: RTNETLINK answers: File exists Mar 14 00:31:28 centos7 systemd: network.service: control process exited, code=exited status=1 Mar 14 00:31:28 centos7 systemd: Failed to start LSB: Bring up /down networking. Mar 14 00:31:28 centos7 systemd: Unit network.service entered failed state. Mar 14 00:31:28 centos7 systemd: network.service failed. Mar 14 00:33:42 centos7 dhclient[3813]: DHCPREQUEST on eno16777736 to 10.0.0.254 port 67 (xid=0x4d17f187) Mar 14 00:33:42 centos7 dhclient[3813]: DHCPACK from 10.0.0.254 (xid=0x4d17f187) |
那个错误已经不见了,但是重启网卡
1
2
3
|
[root@centos7 ~] # systemctl restart network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [root@centos7 ~] # |
依然是这个错误,然后我又重新百度,说虚拟机设置中的两个连接选项(已连接和启动时连接)没有选择也会报同样的错,但是我的已经连接,问题依然存在,到底是因为什么呢?再次查找方法。
结果这次认真看了日志报错后发现是说eth0这个文件找不到
1
2
|
Mar 14 00:36:39 centos7 network: Bringing up interface eth0: ERROR : [ /etc/sysconfig/network-scripts/ifup-eth ] Device eth0 does not seem to be present, delaying initialization. Mar 14 00:36:39 centos7 /etc/sysconfig/network-scripts/ifup-eth : Device eth0 does not seem to be present, delaying initialization. |
原来是之前做优化的时候将7的网卡名改成了eth0(众所周知7的网卡名是eno后面随机 一串数字),生成菜单时没有生效,那么在此生效一下
注意网卡配置名是已经修改成eth0以后执行下面操作,一共修改的地方有三处,第一处网卡名:/etc/sysconfig/network-scripts/ifcfg-eth0 ,第二处配置文件里面:NAME=eth0 ,第三处也是配置文件里面:DEVICE=eth0
修改/etc/sysconfig/grub,添加net.ifnames=0 biosdevname=0
1
2
3
4
5
6
7
8
9
|
[root@centos7 ~] # cat /etc/sysconfig/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR= "$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU= true GRUB_TERMINAL_OUTPUT= "console" GRUB_CMDLINE_LINUX= "crashkernel=128M rd.lvm.lv=centos/root rhgb quiet net.ifnames=0 biosdevname=0" GRUB_DISABLE_RECOVERY= "true" [root@centos7 ~] # |
生成菜单
1
2
3
4
5
6
7
8
|
[root@centos7 ~] # grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3 .10.0-327.el7.x86_64 Found initrd image: /boot/initramfs-3 .10.0-327.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-8058723e5e754d3aabc51842d9108e3b Found initrd image: /boot/initramfs-0-rescue-8058723e5e754d3aabc51842d9108e3b .img done [root@centos7 ~] # |
最后reboot重启
最后登录后正常
(转)启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结的更多相关文章
- centos7启动网卡报错(Failed to start LSB: Bring up/down networking )
systemctl status network.service systemctl stop NetworkManager systemctl disable NetworkManager syst ...
- 解决报错Failed to start LSB: Bring up/down networking:MAC地址导致
1.场景描述,我在电脑里装好的虚拟机,今天突然就网络无法打开,并出现如下报错: [root@ansible-control ~]# systemctl start networkJob for net ...
- 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法
我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...
- 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法
我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...
- CentOS 7.2重启网络报错 Failed to start LSB: Bring up/down
CentOS 7.2重启网络报错 Failed to start LSB: Bring up/down 我的虚拟机原本有两块网卡,一块叫eno16777736,另一块叫eno5033674.本来是正常 ...
- 突然虚拟机无法联网解决办法,且报错Failed to start LSB: Bring up/down
使用sudo service network restart去启动网络时起不来 使用systemctl status network.service查看网络状态也是failed,且报错Failed t ...
- CentOS7 Failed to start LSB: Bring up/down networking.解决方法
https://www.cnblogs.com/bonjov1/p/4323836.html CentOS7 Failed to start LSB: Bring up/down networking ...
- CentOS7 重启网卡Failed to start LSB: Bring up/down networking.解决方法
环境:MAC PD虚拟机安装centos7 修改完网卡配置,重启网络服务报错 使用提示命令查看:systemctl status network.service 发现报错为Failed to star ...
- Eclipse及Eclipse为基础的App报错“Failed to create the Java Virtual Machine”的解决办法
由于OracleJDK马上就要收费了,公司要求更换OpenJDK,结果安装后Eclipse及Eclipse为基础的App启动报错:“Failed to create the Java Virtual ...
- CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法
1 ~]# systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 1 ~]# Failed to start mysqld.service: Unit n ...
随机推荐
- julia
版本还不成熟,等成熟了再完整的看看吧.
- leetcode 191 Number of 1 Bits(位运算)
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also know ...
- mysql修改初始密码
通过MySQL命令行,可以修改MySQL数据库的密码,下面就为您详细介绍该MySQL命令行,如果您感兴趣的话,不妨一看. 格式:mysqladmin -u用户名 -p旧密码 password 新密码 ...
- [转] 编写高效的 CSS 选择器
高效的CSS已经不是一个新的话题了,也不是我一个非得重拾的话题,但它却是我在Sky公司工作之时,所感兴趣的,关注已久的话题. 有很多人都忘记了,或在简单的说没有意识到,CSS在我们手中,既能很高效,也 ...
- bzoj 3680(洛谷1337) 吊打XXX——模拟退火
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3680 https://www.luogu.org/problemnew/show/P1337 ...
- BZOJ3524:[POI2014]Couriers
浅谈主席树:https://www.cnblogs.com/AKMer/p/9956734.html 题目传送门:https://www.lydsy.com/JudgeOnline/problem.p ...
- channelartlist中autoindex无效的解决方法
{dede:channelartlist}中有使用autoindex无效的解决方法 在设计频道首页的时候,使用{dede:channelartlist}标签时,有很多朋友想做一些高级的开发,让重复的频 ...
- 1、CDH集群搭建
一.准备工作 1.系统环境 系统centos6.5 节点三台: 192.168.1.130 192.168.1.131 192.168.1.132 1.所有节点关闭防火墙 service iptabl ...
- HDU - 5451 Best Solver(循环节+矩阵快速幂)
Best Solver The so-called best problem solver can easily solve this problem, with his/her childhood ...
- linux下 C编程改变输出字体颜色
格式: echo "\033[字背景颜色;字体颜色m字符串\033[0m"例如:echo "\033[41;36m something here \033[0m" ...