1. 程式人生 > >Centos 7不能上網,Job for iptables.service failed because the control process exited with error code.

Centos 7不能上網,Job for iptables.service failed because the control process exited with error code.

一、先檢查自己的網路配置資訊:路徑: vi /etc/sysconfig/network-scripts/ifcfg-eno16777736   如圖


重啟網路配置的命令:service network restart或者是systemctl restart network

我在重啟網路時報的錯誤:

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

" for details. 

service network restart

根據上面報的錯,我去檢視日誌,日誌說好像是沒有可以連結的裝置,但是我是有的,

 報的錯:Error: Connection activation failed: No suitable device found for this connection.

我在網上找了很多方法都不行,花費了我好長時間。

解決方法:

執行下列命令:

chkconfig network off

chkconfig network on

service NetworkManager stop

service NetworkManager start

這命令的意思是:重新執行網路管理裝置