某一日,用systemctl --failed查看到如下错误信息,但实际上网络是OK的,真奇怪:

1
2
3
4
5
6
7
8
[root@localhost.localdomain media]# systemctl --failed
UNIT            LOAD   ACTIVE SUB    DESCRIPTION
network.service loaded failed failed LSB: Bring up/down networking
LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

执行此命令来解决这个问题:

1
[root@F1A-SWPE ~]#  systemctl enable NetworkManager-wait-online.service

重启后再次用systemctl --failed查看,问题消失:

1
2
3
[root@localhost.localdomain ~]# systemctl --failed
0 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

解决问题的关键跟/usr/lib/systemd/system/NetworkManager-wait-online.service这个文档有关,其内容如下:

[Unit]
Description=Network Manager Wait Online
Requisite=NetworkManager.service
After=NetworkManager.service
Wants=network.target
Before=network.target network-online.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nm-online -q --timeout=30

[Install]
WantedBy=multi-user.target

有兴趣的同学不妨研究一下这个文档就能明了!!

最后sudo service network restart    解决

CentOS7 network.service loaded failed 处理技巧的更多相关文章

  1. RHEL7/CentOS7 Network Service开机无法启动的解决方法

    RHEL7/CentOS7安装完成并配置好所有网络相关配置后重启机器,使用systemctl --failed检查是否有失败的服务,发现在network服务启动失败,使用systemctl statu ...

  2. CentOs7 网卡出现问题Job for network.service failed

    centos7网卡是需要写入MAC地址的不然启动不了 在运行“/etc/init.d/network restart”命令时,出现错误“Job for network.service failed.  ...

  3. Centos7 虚拟机复制后网卡问题 Job for network.service failed

    在运行“/etc/init.d/network restart”命令时,出现错误“Job for network.service failed. See 'systemctl status netwo ...

  4. CentOS 7 配置静态IP后不生效 & Job for network.service failed

    参考:http://tieba.baidu.com/p/3233996339#57290767555l 在CentOS中配置静态IP后不生效. 解决办法:将/etc/sysconfig/network ...

  5. Job for network.service failed because the control process exited with error code

    转自:https://blog.csdn.net/dongfei2033/article/details/81124465 今天在centOS 7下更改完静态ip后发现network服务重启不了,翻遍 ...

  6. linux网卡出现问题:Job for network.service failed because the control process exited with error code问题

    [转自]:https://blog.csdn.net/dongfei2033/article/details/81124465 今天在centOS 7下更改完静态ip后发现network服务重启不了, ...

  7. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

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

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

  9. centOS 7一个解决“network.service: control process exited, code=exited status=1”方法

    今天早上2017-08-04,我打开虚拟机,使用远程工具xshell对虚拟机进行连接,我发现连接不上去,然后我ifconfig,发现找不到ens33了,就剩一个本地回环,看来是我的网络出现了问题,然后 ...

随机推荐

  1. php7不再支持HTTP_RAW_POST_DATA,微信支付$GLOBALS[‘HTTP_RAW_POST_DATA’]获取不到数据,

    升级到php7后, 发现旧的web系统有些问题, 查看后才发现原来是php7不再支持HTTP_RAW_POST_DATA 原来系统一些地方, 使用$GLOBALS[‘HTTP_RAW_POST_DAT ...

  2. jstree设置checkbox单选

    jstree设置插件checkbox只允许单选 jstree version console.log($.jstree.version); 3.3.8 单选配置参数: $.jstree.default ...

  3. 灵动微本土MCU厂商具有吸引力的增长点

    作为各种电子产品的控制和处理核心,微控制单元(MCU)器件是一种集成微处理器(CPU).存储器(RAM/ROM).计数器,以及I/O端口的芯片.从MCU内核架构来看,单片机有历经多年的8051,基于A ...

  4. LintCode_175 翻转二叉树

    题目 翻转一棵二叉树 您在真实的面试中是否遇到过这个题? Yes 样例 1 1 / \ / \ 2 3 => 3 2 / \ 4 4 和前序遍历代码很相似从叶子节点依次翻转递归到根节点C++代码 ...

  5. nginx配置静态资源压缩

    sendfile on; #让nginx在传输文件时直接在磁盘和tcp socket之间传输数据 location ~ .*\.(txt|xml)$ { gzip on; #开启压缩 gzip_htt ...

  6. php中array_slice和array_splice函数解析方式方法

    array_slice array array_slice ( array $array , int $offset [, int $length = NULL [, bool $preserve_k ...

  7. 【软件安装】Linux下安装OpenSSL

    安装环境: 操作系统:Ubuntu14.04 OpenSLL Version:openssl-1.0.2n.tar.gz(1.0.2版本为稳定版本,1.1.0为开发版本) OpenSLL下载地址为:h ...

  8. 遗传算法MATLAB实现(2):一元函数优化举例

    遗传算法提供了一种求解非线性.多模型.多目标等复杂系统优化问题的通用框架. 先从例子开始,慢慢再总结理论... [例]利用遗传算法计算函数f(x)=x*cos(5*pi*x)+3.5在区间[-1,2. ...

  9. hdu4267 线段树

    开始敲了一发线段树,觉得可以暴力一点的过,tle了.后来进行修改,发现了问题. 后来一看大神的做法,由于1<=k<=10,所以对于不同的k,有55个余,找答案的时候只要找不同的k值满足条件 ...

  10. 支付宝sdk iOS 集成

    1添加支付宝源文件和库文件AlipayOrder.h    AlipayOrder.m    AlipayResult.h    AlipayResult.m  AlixLibService.h   ...