centOS 7网络连接问题解决办法Job for network.service failed because the control process exited with error code

今天在centOS 7下更改完静态ip后发现network服务重启不了

首先看问题:执行systemctl start network

命令后出现下面的错误:

[root@bender ~]# systemctl start network
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命令后出现如下错误信息:

-- Unit network.service has begun starting up.
Dec 15 04:49:40 bender network[92991]: Bringing up loopback interface:  [  OK  ]
Dec 15 04:49:40 bender NetworkManager[822]:   [1544867380.1524] audit: op="connec
Dec 15 04:49:40 bender network[92991]: Bringing up interface ens33:  Error: Connection 
Dec 15 04:49:40 bender network[92991]: [FAILED]
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender network[92991]: RTNETLINK answers: File exists
Dec 15 04:49:40 bender systemd[1]: network.service: control process exited, code=exited
Dec 15 04:49:40 bender systemd[1]: Failed to start LSB: Bring up/down networking.
-- Subject: Unit network.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.service has failed.
-- 
-- The result is failed.

network服务启动不了首先保证/etc/sysconfig/network-scripts目录下的ifcfg-xxx(每台机器不一定相同)没有错误(如果你改动过的话),这里的错误指的在更改过程中因为手误敲错字母之类的。

 

网上最常见的几种做法如下:

1.和 NetworkManager 服务有冲突,这个好解决,直接关闭 NetworkManger 服务就好了, service NetworkManager stop,并且禁止开机启动 chkconfig NetworkManager off 。之后重启就好了。

systemctl start NetworkManager
systemctl disable  NetworkManager

2和配置文件的MAC地址不匹配,这个也好解决,使用ip addr(或ifconfig)查看mac地址

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

systemctl enable NetworkManager-wait-online.service
「点点赞赏,手留余香」

    还没有人赞赏,快来当第一个赞赏的人吧!
0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论