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

Posted Linuxbugs(卡西莫多伯伯)

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centOS 7一个解决“network.service: control process exited, code=exited status=1”方法相关的知识,希望对你有一定的参考价值。

 

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

[[email protected] ~]# 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

可以使用了:

[[email protected] 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

 

以上是关于centOS 7一个解决“network.service: control process exited, code=exited status=1”方法的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 7 安装问题解决方案

CentOS 7忘记root密码解决办法?(′ε`)

CentOS 7 忘记root密码解决方法

Centos下安装部署gisserver及centos6-7中文乱码解决

centos 7 救援模式,解决忘记root用户密码重置

Docker CentOS 7.2镜像systemd问题解决办法