centos 7 network.service: control process exited, code=exited status=1

张映 发表于 2019-05-20

分类目录: linux

标签:,

玩linux系统十几年了,好长时间没有碰到过网络问题了。浪费一个小时去解决。挺怪的一个问题。

1,重启网络报错

# systemctl status network
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since Mon 2019-05-20 12:53:12 CST; 2s ago
Process: 3752 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost network[3752]: RTNETLINK answers: File exists
May 20 12:53:12 localhost systemd[1]: network.service: control process exited, code=exited status=1
May 20 12:53:12 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
May 20 12:53:12 localhost systemd[1]: Unit network.service entered failed state.

一直没问题,突然出现的。ifconfig查看Ip是有,但不是我设定的静态局域网IP。检查了一下网络配置文件,没有发现任何问题。

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 inet 127.0.0.1/8 scope host lo
 valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
 valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
 link/ether 00:e0:66:c9:f8:d6 brd ff:ff:ff:ff:ff:ff
 inet 10.0.40.251/24 brd 10.0.40.255 scope global enp4s0
 valid_lft forever preferred_lft forever
 inet6 fe80::2e0:66ff:fec9:f8d6/64 scope link
 valid_lft forever preferred_lft forever

enp4s0这个网络接口,在network-scripts没有,只有enp3s0。并且没有改过这个东西。为什么突然会变,如果有谁知道,告之一下。

2,解决办法

# mv ifcfg-enp3s0 ifcfg-enp4s0

将NAME和DEVICE改一下,然后重启网络,应当就OK了。

如果还不行,将

# systemctl stop NetworkManager
# systemctl disable NetworkManager

重启一下电脑



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/linux/2139.html

留下评论

留下评论
  • (必需)
  • (必需) (will not be published)
  • (必需)   4X3=?