zoukankan      html  css  js  c++  java
  • centos 7 network.service control process exited

    一、service network restart 出错
    • 问题描述:
      vmware 12 下centos 7 网络模式,NAT
      昨晚作者打算更新自己虚拟机python,发现没网络ping www.baidu.com,然后windows 上ping 192.168.187.130 本地,发现没问题,
      所以重启网络服务: service network restart 发现出现以下错误:
      Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
      根据提示输入:
      [root@localhost~] # systemctl status network service
      发现:
      08月 31 08:57:10 localhost.localdomain systemd[1]: network.service: control process exited, code=exited
      status=1
      08月 31 08:57:10 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
      08月 31 08:57:10 localhost.localdomain systemd[1]: Unit network.service entered failed state.

    • 查看问题:
      因此查看自己mac 地址和配置文件中是否一致:终端输入 ip addr 红色框起来为Mac地址
      root@localhost~] # ip addr
    • 查看ifcfg-enoxxxxxxx 下mac
      然后进入目录: /etc/sysconfig/network-scripts 下查看 ifcfg-eno16777736 下图中红框文件

      发现下图中红色header 中mac地址是一致的。

      如果需要修改成静态IP配置可以参考我蓝色框,和黄色框

    确认 mac 静态Ip配置都没问题

    再次运行:还是上面的错误
    [root@localhost~] # service network restart

    试试是否和NetworkManager 服务有冲突:
    解决办法,关闭NetworkManager服务并静止开机启动
    [root@localhost~] # service NetworkManager stop
    [root@localhost~] # chkconfig NetworkManager off

    在ping www.baidu.com 就没问题了
    我的问题就这么解决了

    二、上面谈的修改静态IP

    先查看自己虚拟机虚拟网络设置:编辑--->虚拟网络编辑器--->接着下面的

    然后vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 文件,参考下图中的蓝色框和黄色框:

    人生还有意义。那一定是还在找存在的理由
  • 相关阅读:
    接口测试和性能测试
    loadrunner总结
    loadrunner 基本操作
    loadrunner安装和应用
    qtp安装和使用
    Quality Center安装步骤
    JIRA的安装及配置
    testlink使用方法
    python3常用模块--熟练使用
    python2和python3差异
  • 原文地址:https://www.cnblogs.com/pangguoming/p/10823847.html
Copyright © 2011-2022 走看看