系统相关
首页 > 系统相关> > centOS 7一个解决“network.service: control process exited, code=exited status=1”方法.

centOS 7一个解决“network.service: control process exited, code=exited status=1”方法.

作者:互联网

原文链接:https://blog.csdn.net/woodrow1994/article/details/79412287

1.centOS 7一个解决“network.service: control process exited, code=exited status=1”方法.

今天早上2017-08-04,我打开虚拟机,使用远程工具xshell对虚拟机进行连接,我发现连接不上去,然后我ifconfig,发现找不到ens33了,就剩一个本地回环,看来是我的网络出现了问题,然后我查看我的网络状态,发现了如下情况:

 

[root@CT71 ~]# systemctl status network.service

● 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 Fri 2017-08-04 08:20:31 CST; 1min 44s ago

Docs: man:systemd-sysv-generator(8)

Process: 62726 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)

Process: 63183 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

 

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists

Aug 04 08:20:31 CT71 systemd[1]: network.service: control process exited, code=exited status=1

Aug 04 08:20:31 CT71 systemd[1]: Failed to start LSB: Bring up/down networking.

Aug 04 08:20:31 CT71 systemd[1]: Unit network.service entered failed state.

Aug 04 08:20:31 CT71 systemd[1]: network.service failed.

 

我在某度上找了好几个答案,都没有找到我能解决问题的答案,然后我进行Google,在一个博客上找到了我需要的答案,不知道是不是会针对于大家都可以,方法是关闭网络管理,如下:

 

systemctl stop NetworkManager

 

我在执行上面一步后就已经解决了问题,那个博客给出的答案还有下面的步骤,我没有用:

 

systemctl disable NetworkManager

 

Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.

Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.

Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.

 

然后重启网络:

 

systemctl start network.service

 

可以使用了:

 

[root@CT71 bin]# ifconfig

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 172.17.251.180 netmask 255.255.0.0 broadcast 172.17.255.255

inet6 fe80::20c:29ff:fe84:b4 prefixlen 64 scopeid 0x20<link>

ether 00:0c:29:84:00:b4 txqueuelen 1000 (Ethernet)

RX packets 3629648 bytes 315562709 (300.9 MiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 2974 bytes 295864 (288.9 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 192.168.111.110 netmask 255.255.255.0 broadcast 192.168.111.255

inet6 fe80::febf:b561:4150:f3b0 prefixlen 64 scopeid 0x20<link>

ether 00:0c:29:84:00:be txqueuelen 1000 (Ethernet)

RX packets 121771 bytes 11870451 (11.3 MiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 94155 bytes 20071976 (19.1 MiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

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 90 bytes 6748 (6.5 KiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 90 bytes 6748 (6.5 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255

ether 52:54:00:b6:46:31 txqueuelen 1000 (Ethernet)

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
————————————————
版权声明:本文为CSDN博主「linuxbugs」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/woodrow1994/article/details/79412287

标签:control,status,20,network,04,08,CT71,31,exited
来源: https://blog.csdn.net/m0_37970699/article/details/100573410