All Products
Search
Document Center

:Resolve the 'Job for network.service failed because the control process exited with error code.' error when starting the network service

Last Updated:Nov 24, 2025

Problem description

When you run the systemctl restart network command in Linux to start the network service, the error Job for network.service failed because the control process exited with error code. is returned, as shown in the following figure. This topic uses a CentOS 7.9 system as an example.报错信息

Troubleshooting

If this issue occurs, run the sudo journalctl -xe -u network.service command to view the detailed cause.

image

Possible causes

This issue can be caused by network configuration errors that prevent Elastic Network Interfaces (ENIs) from loading correctly. These errors often occur after you modify the network configuration. Common scenarios include the following:

  • A secondary ENI was detached from the instance in the console or using OpenAPI, but the configuration file for the corresponding ENI was not deleted.

  • The ENI name in the configuration file does not match the actual name. For example, you run the ip a command and the output shows that the actual ENIs are eth0 and eth1, but they are named eth0 and eth2 in the network configuration file (/etc/sysconfig/network-scripts/ifcfg-*).

Solution

Follow these steps to align your network configuration with the actual setup. This includes deleting configuration files for ENIs that do not exist and ensuring that ENIs are named correctly.

  1. Connect to the ECS instance remotely.

    For more information, see Overview of connection methods.

  2. Check whether the ENI configuration files match the ENIs of the ECS instance.

    • View the ENI configuration files.

      ll /etc/sysconfig/network-scripts/ifcfg*
      Note

      The directory for ENI configuration files varies by operating system. Modify the preceding command as needed.

      • Red Hat series: /etc/sysconfig/network-scripts/

        • CentOS 6/7/8

        • Red Hat 6/7/8/9

        • Anolis 7/8

        • Fedora 33/34/35

        • Alibaba Cloud Linux 2/3

        • CentOS Stream 8/9

        • Rocky Linux

        • AlmaLinux

      • Ubuntu 18/20: /etc/netplan/

      • SLES series: /etc/sysconfig/network/

        • OpenSUSE

        • SUSE Linux

      • Debian and Ubuntu 16.04 or earlier: Hot-plugging is supported for ENIs. Therefore, a non-existent ENI does not affect network service startup.

      The following figure shows that configuration files exist for two ENIs: eth0 and eth1.查看网卡配置文件

    • View the ENI information of the ECS instance.

      ip address show

      The following figure shows that the ECS instance has only one ENI: eth0.查看网卡信息

    • If the configuration files do not match the actual ENIs, proceed to step 3.

    • If the ENI names in the configuration files do not match the actual ENI names, modify the file names (ifcfg-eth*) and the DEVICE values within the files to ensure that they are consistent. Then, proceed to step 4.

    • If the configuration files and the actual ENIs are consistent, no further action is required.

  3. Delete the extra ENI configuration file.

    rm -rf /etc/sysconfig/network-scripts/ifcfg-eth1

    The following figure shows that the configuration file for the eth1 ENI has been deleted.删除网卡配置文件

  4. Restart the network service.

    systemctl restart network
  5. Check the status of the network service.

    systemctl status network

    The following figure shows that the status of the network service is Normal.查看网络服务状态