service network restart 无法启动,ifconfig内容异常

问题日志:

[root@hadoop-01 network-scripts]# service network restart 
Restarting network (via systemctl):  Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
                                                           [FAILED]
[root@hadoop-01 network-scripts]# systemctl status network.service
● 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 Sat 2020-05-23 14:27:44 CST; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3332 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 network[3332]: RTNETLINK answers: File exists
May 23 14:27:44 hadoop-01 systemd[1]: network.service: control process exit...=1
May 23 14:27:44 hadoop-01 systemd[1]: Failed to start LSB: Bring up/down ne...g.
May 23 14:27:44 hadoop-01 systemd[1]: Unit network.service entered failed state.
May 23 14:27:44 hadoop-01 systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

现象(NET模式,现在与主机无法ping通):

[root@hadoop-01 ~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:b7:62:bc  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@hadoop-01 ~]# 

场景:虚拟机环境+2台克隆虚拟机,设置静态ip之后,出现这个问题

解决方案:

编辑:/etc/sysconfig/network-scripts/ifcfg-ens33

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
IPADDR="192.168.1.12"
NETMASK="255.255.255.0"
NETWORK="192.168.1.1"
GATEWAY="192.168.1.2"
DNS1=8.8.8.8
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="c5dabc99-22de-41ec-ab3b-da21025a1b69"
DEVICE="ens33"
ONBOOT="yes"


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值