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

2023-03-08,,

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

因为是克隆的,所以需要重新修改静态IP

vim /etc/sysconfig/network-scripts/ifcfg-xxx

修改

BOOTPROTO=static

下方添加

IPADDR=静态IP地址
GATEWAY=默认网关
NETMASK=255.255.255.0
DNS1=114.114.114.114

保存之后执行

systemctl restart network

结果报错了

Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

这时候就纠结了,跑去原来的系统中查看源码看是不是手误改到了哪一项,结果发现原来的系统也不行了, 使用 ifconfig查看了一下

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

少了一项网卡的,尝试着重启了系统,再测试一下,也是不行.跑去翻了网络上的大神门都是怎么解决了,尝试了数种方法,终于两个系统都解决了

在 /etc/sysconfig/network-scripts目录下删除掉别的ifcfg-xxx(只保留一个你网卡同名的文档)

再把NetworkManager停用

systemctl stop NetworkManager
systemctl disable NetworkManager

使用 ip addr 查看 mac地址,把mac地址添加进 ifcfg-xxx 的HWADDR中(如果没有就再新添加一项)

HWADDR=xx:xx:xx:xx:xx:xx

:wq 保存之后再执行 systemctl restart network 就可以解决了

Job for network.service failed because the control process exited with error code问题的相关教程结束。

《Job for network.service failed because the control process exited with error code问题.doc》

下载本文的Word格式文档,以方便收藏与打印。