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

/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

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




还有其他两种可以尝试的方法虽然这两种都没解决我的问题,但是也许能解决其他人的问题:
第一种方法查看错误:

[root@localhost ~]# 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 Wed 2017-04-26 06:22:44 EDT; 12s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2664 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain network[2664]: RTNETLINK answers: File exists
Apr 26 06:22:44 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Apr 26 06:22:44 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Apr 26 06:22:44 localhost.localdomain systemd[1]: Unit network.service entered failed state.
Apr 26 06:22:44 localhost.localdomain systemd[1]: network.service failed.
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
[root@localhost ~]# 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 Wed 2017-04-26 06:22:44 EDT; 1min 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2664 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

查看网卡地址:
[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:54:ed:b7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.218.100/24 brd 192.168.218.255 scope global ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe54:edb7/64 scope link
       valid_lft forever preferred_lft forever

将上面的网卡地址00:0c:29:54:ed:b7添加到网卡的配置中:
[root@bogon ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
加入:
HWADDR=00:0c:29:54:ed:b7

方法二:

通过查找相关文档,使用如下方法解决了问题:设定开机启动一个名为NetworkManager-wait-online服务,命令为:

systemctl enable NetworkManager-wait-online.service

CentOS7 Failed to start LSB: Bring up/down解决方法(真正有效的方法)的更多相关文章

  1. CentOS7 Failed to start LSB: Bring up/down解决方法

    刚刚装好的虚拟机突然不能上网了,报错很诡异,具体报错如下: /etc/init.d/network restart Restarting network (via systemctl):  Job f ...

  2. 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 ...

  3. CentOS7 Failed to start LSB: Bring up/down networking. 已解决!!!

    服务器更换了主板之前配置的静态IP发现启动网卡出现异常. 执行 service network restart 出现以下错误 Restarting network (via systemctl):  ...

  4. CentOS7 Failed to start LSB: Bring up/down

    原文地址:http://addam.blog.51cto.com/5041993/1839518 刚刚装好的虚拟机突然不能上网了,报错很诡异,具体报错如下: /etc/init.d/network r ...

  5. code=exited,status=1/failure;failed to start LSB:Bring up/down networking

    环境: CentOS 7 vmware 12 操作: 复制可使用的vmware centOS 7系统至新环境 问题: 无法启动网络 查看“systemctl status network" ...

  6. 突然虚拟机无法联网解决办法,且报错Failed to start LSB: Bring up/down

    使用sudo service network restart去启动网络时起不来 使用systemctl status network.service查看网络状态也是failed,且报错Failed t ...

  7. CentOS7 重启网卡Failed to start LSB: Bring up/down networking.解决方法

    环境:MAC PD虚拟机安装centos7 修改完网卡配置,重启网络服务报错 使用提示命令查看:systemctl status network.service 发现报错为Failed to star ...

  8. [转载]解决虚拟机中Centos7出现错误:Failed to start LSB: Bring up/down networking

    1.执行 service network restart 出现以下错误 Restarting network (via systemctl):  Job for network.service fai ...

  9. 【centos7】 Failed to start LSB Bring up/down

    今天碰到几个问题: 1. Failed to start LSB Bring up/down 归结一下 百度 的答案: 1). 90% 修改MAC 地址 2).10% 重启 networkmanage ...

随机推荐

  1. python爬虫爬取汽车页面信息,并附带分析(静态爬虫)

    环境: windows,python3.4 参考链接: https://blog.csdn.net/weixin_36604953/article/details/78156605 代码:(亲测可以运 ...

  2. php 文件锁flock解决并发

    方案一:使用文件锁排它锁 flock函数用于获取文件的锁,这个锁同时只能被一个线程获取到,其它没有获取到锁的线程要么阻塞,要么获取失败 在获取到锁的时候,先查询,如果查询成功则进行操作,然后释放锁 f ...

  3. ACM_逆序数(归并排序)

    帮挂科 Time Limit: 2000/1000ms (Java/Others) 64bit IO Format: %lld & %llu Problem Description: 冬瓜发现 ...

  4. 彩色模型 分类: 图像处理 Matlab 2015-01-08 20:43 364人阅读 评论(0) 收藏

    彩色模型(又称彩色空间或彩色系统)是描述色彩的一种方法,本质上,彩色模型就是坐标系统和子空间的规范,系统中的每种颜色由单个点来表示.下面介绍两种最常用的彩色模型. 一.RGB彩色模型: RGB模型是最 ...

  5. GOTO语句以及GOTO机制的模式实现

    goto语句提供了方法内部的任意跳转,它在特殊场景下被应用. 而假设一个对象执行一个方法后,我们期望其余任何对象都可以捕获它,然后自己执行某些操作,那么可以怎么实现呢 class 皇宫 { void ...

  6. B/S和C/S示意图

    B/S C/S

  7. [转]Monkey测试简介

    转自:http://www.cnblogs.com/manuosex/p/3215270.html 在android手机上做自动化测试,monkey比cts,Android UnitTest 好用多了 ...

  8. Jmeter+Jenkins+Ant自动化集成环境搭建

    搭建环境: JDK:jdk1.8.0_92 Ant:apache-ant-1.9.7 Jmeter: apache-jmeter-3.0 Jenkins:jenkins-2.19.3 具体环境配置 1 ...

  9. javaScript关闭浏览器 (不弹出提示框)

    一段JavaScript脚本程序,负责关闭窗口,如果网页不是通过脚本程序打开的(window.open()),调用window.close()脚本关闭窗口前,必须先将window.opener对象置为 ...

  10. Matlab基础之单元数组和结构数组

    Matlab基础之单元数组和结构数组 前言: 单元数组和结构数组是一种新的数据类型,能将不同类型.不同维数的数组组合在一起,从而方便对不同的数据类型方便管理和维护. 如上图所示的2*2矩阵中,分别存储 ...