重启网络出现报错 Job for network.service failed because the control process exited with error code. See "systemctl status networ
重启网络出现报错
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
今天更改完静态ip后发现network服务重启不了,翻遍了网络,尝试了各种方法,终于解决了。
执行systemctl restart network.service命令后出现下面的错误
[root@WEB01 ~]# systemctl restart networkJob for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
按照报错提示输入了systemctl status network.service
[root@web01 ~]# systemctl status network● 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 日 2022-11-13 11:36:56 CST; 7min aGo Docs: man:systemd-sysv-generator(8) Process: 1298 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 1457 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)11月 13 11:36:56 web01 network[1457]: [ 确定 ]11月 13 11:36:56 web01 network[1457]: 正在打开接口 eth1: 连接已成功激活(D-Bus 活动路径:/org/freed…on/4)11月 13 11:36:56 web01 network[1457]: [ 确定 ]11月 13 11:36:56 web01 network[1457]: 正在打开接口 eth2: ERROR : [/etc/sysconfig/network-script…esent.11月 13 11:36:56 web01 /etc/sysconfig/network-scripts/ifup-eth[1647]: Device name does not seem to be p....11月 13 11:36:56 web01 network[1457]: [失败]11月 13 11:36:56 web01 systemd[1]: network.service: control process exited, code=exited status=111月 13 11:36:56 web01 systemd[1]: Failed to start LSB: Bring up/down networking.11月 13 11:36:56 web01 systemd[1]: Unit network.service entered failed state.11月 13 11:36:56 web01 systemd[1]: network.service failed.Hint: Some lines were ellipsized, use -l to show in full.
解决方法
1网络配置工具network和NetworkManager冲突导致的,NetworkManager一般用于安装了桌面环境的linux系统,一般情况下我们直接使用以下明令禁止使用NetworkManager就行了
[root@web01 ~]# systemctl stop NetworkManager[root@web01 ~]# systemctl disable NetworkManagerRemoved symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.[root@web01 ~]# systemctl status NetworkManager● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disable; vendor preset: enabled) Active: inactive (dead) since 日 2022-11-13 11:50:58 CST; 5s ago Docs: man:NetworkManager(8) Process: 667 ExecStart=/usr/sbin/NetworkManager --no-daemon (code=exited, status=0/SUCCESS) Main PID: 667 (code=exited, status=0/SUCCESS)11月 13 11:36:56 web01 NetworkManager[667]: [1668310616.7621] device (eth1): state change: i...ed')11月 13 11:36:56 web01 NetworkManager[667]: [1668310616.7630] device (eth1): state change: s...ed')11月 13 11:36:56 web01 NetworkManager[667]: [1668310616.7654] device (eth1): Activation: suc...ted.11月 13 11:36:56 web01 NetworkManager[667]: [1668310616.7795] ifcfg-rh: loading "/etc/syscon...eys.11月 13 11:36:56 web01 NetworkManager[667]: [1668310616.7912] ifcfg-rh: loading "/etc/syscon...eys.11月 13 11:50:58 web01 NetworkManager[667]: [1668311458.4319] caught SIGTERM, shutting down ...lly.11月 13 11:50:58 web01 systemd[1]: Stopping Network Manager...11月 13 11:50:58 web01 NetworkManager[667]: [1668311458.4325] manager: NetworkManager state ...SITE11月 13 11:50:58 web01 NetworkManager[667]: [1668311458.4343] exiting (success)11月 13 11:50:58 web01 systemd[1]: Stopped Network Manager.Hint: Some lines were ellipsized, use -l to show in full.
关闭之后重启发现不能解决,问题不大继续尝试其他方法
2看VMWare右下角的网络适配器
是否连接,如果没有连接则连接上。
3如果你改成了静态ip别忘了将BOOTPROTO
改为static
4最后发现是/etc/syscofig/network-scripts/下多了一个ifcfg-eth2的文件,把多余的文件删除或者移动即可
[root@web01 ~]# rm -f /etc/sysconfig/network-scripts/ifcfg-eth2[root@web01 ~]# systemctl restart network.service [root@web01 ~]#
重启成功
来源地址:https://blog.csdn.net/weixin_69007450/article/details/127830383
--结束END--
本文标题: 关于Job for network.service failed because the control process exited with error code.
本文链接: https://lsjlt.com/news/390400.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0