关于Job for network.service failed because the control process exited with error code.

这篇具有很好参考价值的文章主要介绍了关于Job for network.service failed because the control process exited with error code.。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

重启网络出现报错

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服务重启不了,翻遍了网络,尝试了各种方法,终于解决了。

1.执行systemctl restart network.service命令后出现下面的错误

[root@web01 ~]# systemctl  restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

2.按照报错提示输入了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=1
11月 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.

3.解决方法

3.1网络配置工具network和NetworkManager冲突导致的,NetworkManager一般用于安装了桌面环境的Linux系统,一般情况下我们直接使用以下明令禁止使用NetworkManager就行了

[root@web01 ~]# systemctl stop NetworkManager
[root@web01 ~]# systemctl disable NetworkManager
Removed 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]: <info>  [1668310616.7621] device (eth1): state change: i...ed')
11月 13 11:36:56 web01 NetworkManager[667]: <info>  [1668310616.7630] device (eth1): state change: s...ed')
11月 13 11:36:56 web01 NetworkManager[667]: <info>  [1668310616.7654] device (eth1): Activation: suc...ted.
11月 13 11:36:56 web01 NetworkManager[667]: <warn>  [1668310616.7795] ifcfg-rh: loading "/etc/syscon...eys.
11月 13 11:36:56 web01 NetworkManager[667]: <warn>  [1668310616.7912] ifcfg-rh: loading "/etc/syscon...eys.
11月 13 11:50:58 web01 NetworkManager[667]: <info>  [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]: <info>  [1668311458.4325] manager: NetworkManager state ...SITE
11月 13 11:50:58 web01 NetworkManager[667]: <info>  [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.

关闭之后重启发现不能解决,问题不大继续尝试其他方法

3.2看VMWare右下角的网络适配器是否连接,如果没有连接则连接上。

关于Job for network.service failed because the control process exited with error code.

3.3如果你改成了静态ip别忘了将BOOTPROTO改为static

3.4最后发现是/etc/syscofig/network-scripts/下多了一个ifcfg-eth2的文件,把多余的文件删除或者移动即可

关于Job for network.service failed because the control process exited with error code.

[root@web01 ~]# rm -f /etc/sysconfig/network-scripts/ifcfg-eth2
[root@web01 ~]# systemctl restart  network.service   
[root@web01 ~]# 

重启成功文章来源地址https://www.toymoban.com/news/detail-507828.html

到了这里,关于关于Job for network.service failed because the control process exited with error code.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包