设为首页收藏本站论坛APP下载
查看: 60|回复: 7

centos7 网卡重启失败,真实机器

[复制链接]

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
发表于 2018-11-9 18:46:46 | 显示全部楼层 |阅读模式
1金币
通过查百度,真的是百度全家都一样无非mac地址错误或者NetworkManage关闭;都不是解决问题的关键,现在倒是不影响业务,但是就是不能重启,哪位大神帮忙看下

[root@zabbix ~]# 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.


通过查看日志也无法定位问题:

Nov  9 18:41:26 [localhost] systemd: Starting LSB: Bring up/down networking...
Nov  9 18:41:26 [localhost] NetworkManager[66436]: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
Nov  9 18:41:26 [localhost] network: 正在打开环回接口: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov  9 18:41:26 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov  9 18:41:26 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov  9 18:41:26 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov  9 18:41:26 [localhost] network: [  确定  ]
Nov  9 18:41:27 [localhost] network: 正在打开接口 em1:
Nov  9 18:41:32 [localhost] network: 正在确定 em1 的 IP 信息...失败:不存在链接。检查电缆?
Nov  9 18:41:32 [localhost] network: [失败]
Nov  9 18:41:32 [localhost] network: 正在打开接口 em2: RTNETLINK answers: File exists
Nov  9 18:41:33 [localhost] network: [  确定  ]
Nov  9 18:41:33 [localhost] NetworkManager[66436]: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
Nov  9 18:41:33 [localhost] network: 正在打开接口 em3: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-em3'
Nov  9 18:41:33 [localhost] NetworkManager[66436]: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
Nov  9 18:41:33 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-em3'
Nov  9 18:41:33 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:34 [localhost] NetworkManager[66436]: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
Nov  9 18:41:34 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-em3'
Nov  9 18:41:34 [localhost] NetworkManager[66436]: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
Nov  9 18:41:34 [localhost] network: 无法载入文件 '/etc/sysconfig/network-scripts/ifcfg-em3'
Nov  9 18:41:34 [localhost] network: [  确定  ]
Nov  9 18:41:34 [localhost] network: 正在打开接口 em4: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: [  确定  ]
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: File exists
Nov  9 18:41:35 [localhost] network: RTNETLINK answers: Network is unreachable
Nov  9 18:41:35 [localhost] systemd: network.service: control process exited, code=exited status=1
Nov  9 18:41:35 [localhost] systemd: Failed to start LSB: Bring up/down networking.
Nov  9 18:41:35 [localhost] systemd: Unit network.service entered failed state.
Nov  9 18:41:35 [localhost] systemd: network.service failed.



附件: 您需要 登录 才可以下载或查看,没有帐号?使用vip格式注册

最佳答案

查看完整内容

ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
回复

使用道具 举报

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
 楼主| 发表于 6 天前 | 显示全部楼层
933  nmcli device ls
  934  systemctl start NetworkManager
  935  nmcli device ls
  936  nmcli connection show
  937  nmcli device status
  938  nmcli device disconnect em1
  939  nmcli device disconnect em2
  940  nmcli device disconnect em3
  941  nmcli device disconnect em4
  942  systemctl status network
  943  journalctl -f -u network
  944  systemctl restart network
  945  systemctl status network
  946  ip a
  947  cd /etc/sysconfig/network-scripts/
  948  ls
  949  cat ifcfg-em1
  950  systemctl start NetworkManager
  951  nmcli connection show
  952  vim ifcfg-em1
  953  systemctl restart network
  954  rm -f ifcfg-em1
  955  systemctl restart network
  956  systemctl status network
  957  ls
  958  nmcli  dev status
  959  nmcli  dev connect em1
  960  nmcli connection show
  961  systemctl stop NetworkManager.service
  962  systemctl restart network
  963  systemctl start NetworkManager
  964  systemctl restart network
  965  ls
  966  rm ifcfg-em1 -f
  967  systemctl stop NetworkManager.service
  968  systemctl restart network
  969  systemctl status network
  970  ls
  971  cat ifcfg-em3
  972  cat ifcfg-em2
  973  ls
  974  cp ifcfg-em2 ifcfg-em1
  975  vim ifcfg-em1
  976  systemctl restart network
  977  systemctl status network
  978  systemctl status NetworkManager
  979  journalctl -f -u network
  980  systemctl status network
  981  cd /etc/sysconfig/network-scripts/
  982  ls
  983  vim ifcfg-em1
  984  systemctl status network
  985  systemctl restart network
  986  systemctl status
  987  systemctl status network
  988  systemctl restart network
  989  ifconfig
  990  vim ifcfg-em1
  991  vim /etc/sysconfig/network-scripts/ifcfg-em2
  992  route -n
  993  vim /etc/sysconfig/network-scripts/ifcfg-em3
  994  systemctl restart network
  995  history
回复

使用道具 举报

28

主题

233

帖子

1205

积分

版主

Rank: 7Rank: 7Rank: 7

积分
1205
发表于 2018-11-9 18:46:47 | 显示全部楼层
<warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property cannot be empty for 'method=manual'
回复

使用道具 举报

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
 楼主| 发表于 2018-11-11 18:30:09 | 显示全部楼层
答疑老师ln 发表于 2018-11-10 19:29
ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-em3" fails: ipv4.addresses: this property  ...

3口之前没配ip地址,后来配上重启也不管用,无法重启网卡
回复

使用道具 举报

28

主题

233

帖子

1205

积分

版主

Rank: 7Rank: 7Rank: 7

积分
1205
发表于 2018-11-12 09:21:11 | 显示全部楼层
你把配置文件贴出来看看
回复

使用道具 举报

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
 楼主| 发表于 7 天前 | 显示全部楼层
答疑老师ln 发表于 2018-11-12 09:21
你把配置文件贴出来看看

[root@zabbix ~]# ifconfig
em1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 44:a8:42:4a:93:86  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
        device interrupt 18  

em2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.200.251.6  netmask 255.255.255.248  broadcast 10.200.251.7
        inet6 fe80::46a8:42ff:fe4a:9387  prefixlen 64  scopeid 0x20<link>
        ether 44:a8:42:4a:93:87  txqueuelen 1000  (Ethernet)
        RX packets 1864793  bytes 1499533413 (1.3 GiB)
        RX errors 0  dropped 98021  overruns 0  frame 0
        TX packets 2313956  bytes 2771154734 (2.5 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  

em3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 1.1.1.1  netmask 255.255.255.252  broadcast 1.1.1.3
        ether 44:a8:42:4a:93:88  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
        device interrupt 19  

em4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.51.202  netmask 255.255.255.0  broadcast 192.168.51.255
        inet6 fe80::46a8:42ff:fe4a:9389  prefixlen 64  scopeid 0x20<link>
        ether 44:a8:42:4a:93:89  txqueuelen 1000  (Ethernet)
        RX packets 18286434  bytes 7498290611 (6.9 GiB)
        RX errors 0  dropped 98028  overruns 0  frame 0
        TX packets 19712171  bytes 8161575256 (7.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  

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 0  (Local Loopback)
        RX packets 4316161  bytes 734379938 (700.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4316161  bytes 734379938 (700.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
回复

使用道具 举报

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
 楼主| 发表于 7 天前 | 显示全部楼层
答疑老师ln 发表于 2018-11-12 09:21
你把配置文件贴出来看看

[root@zabbix ~]# vim /etc/sysconfig/network-scripts/ifcfg-em3

TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=em3
UUID=af0bd5de-6b00-40ce-9a35-a79432e44779
DEVICE=em3
ONBOOT=yes
IPADDR=1.1.1.1
NETMASK=255.255.255.252
~                                                                                                                                                                                                                                                                             
~                                                                                                                                                                                                                                                                             
~                                             
回复

使用道具 举报

6

主题

21

帖子

122

积分

中级VIP会员

Rank: 2

积分
122
 楼主| 发表于 7 天前 | 显示全部楼层
已解决 把端口1 删除  才可以正常启动
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 使用vip格式注册

本版积分规则

咨询QQ

学神论坛APP下载地址
快速回复 返回顶部 返回列表