1.场景描述,我在电脑里装好的虚拟机,今天突然就网络无法打开,并出现如下报错:
[root@ansible-control ~]# 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.
[root@ansible-control ~]# systemctl status network
● 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 日 2019-09-29 22:44:34 CST; 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 5042 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
2.解决方法
关闭NetworkManager,罪魁祸首就是这个服务!
第一步:查看NetworkManager服务状态:
systemctl status NetworkManager
一般是开启的状态!
第二步:关闭NetworkManager,并设置开启默认不启动该服务:
systemctl stop NetworkManager
systemctl disable NetworkManager
第三步:重启network服务
systemctl status network.service
第四步:再次重启网络
systemctl restart network
systemctl status network
此时已经成功开启网络!
更多分享微信搜索“安全info”公众号
添加群主进“安全交流”微信群