CentOS网络服务起不来 Job for network.service failed

今天虚拟机 连接不上,ping ip不通
图片转自 https://www.cnblogs.com/ming369/p/10779835.html

[root@centOS ~]# systemctl start network.service
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.
[root@centOS ~]# systemctl status network.service
CentOS网络服务起不来 Job for network.service failed_第1张图片[root@centOS ~]# journalctl -xe

CentOS网络服务起不来 Job for network.service failed_第2张图片

原因:

在CentOS系统上,目前有NetworkManager和network两种网络管理工具。如果两种都配置会引起冲突,而且NetworkManager在网络断开的时候,会清理路由,如果一些自定义的路由,没有加入到NetworkManager的配置文件中,路由就被清理掉,网络连接后需要自定义添加上去。

解决方法:

1.将networkmanager服务停了

systemctl stop NetworkManager
systemctl disable NetworkManager

2.重启网卡,就ok了

systemctl restart network
systemctl status network

CentOS网络服务起不来 Job for network.service failed_第3张图片
#查看所有已安装服务
systemctl list-units --type=service
CentOS网络服务起不来 Job for network.service failed_第4张图片

你可能感兴趣的:(centos)