r8169 一段时间后停止工作

r8169 一段时间后停止工作

CentOS安装后出现此问题。无论是通过 ssh 还是通过 smb 协议,服务器都变得完全不可用。它是随机发生的,没有确切的规律。它可以在任何时刻发生,并且不依赖于服务器加载或内核版本(上个月尝试了不同)。因此,经过我的第一次调查,我发现这与网络有关。当我发现这个“停电”时,我发现我既无法从办公室网络到服务器也无法从服务器到办公室中的任何计算机 ping 服务器,但我可以 ping 本地主机。而且主板背面的网络绿色LED一直亮着,没有闪烁,橙色LED根本不亮。所以当我这样做的时候systemctl 重新启动网络在服务器本地一切都变得很好。

上次发生时间为 2016 年 10 月 14 日 16:05(作者:MSK TZ)

检查了dmesq

[2016-11-13 01:00:32]  md: using 128k window, over a total of 487313408k.
    [2016-11-13 02:54:57]  md: md127: data-check done.
    [2016-11-13 04:52:32]  md: md1: data-check done.
    [2016-11-14 16:36:57]  usb 4-2: new low-speed USB device number 2 using uhci_hcd
    [2016-11-14 16:36:58]  usb 4-2: New USB device found, idVendor=1a2c, idProduct=0c23
    [2016-11-14 16:36:58]  usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [2016-11-14 16:36:58]  usb 4-2: Product: USB Keyboard
    [2016-11-14 16:36:58]  usb 4-2: Manufacturer: USB
    [2016-11-14 16:36:58]  input: USB USB Keyboard as /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/input/input15
    [2016-11-14 16:36:58]  hid-generic 0003:1A2C:0C23.0001: input,hidraw0: USB HID v1.10 Keyboard [USB USB Keyboard] on usb-0000:00:1a.1-2/input0
    [2016-11-14 16:36:58]  input: USB USB Keyboard as /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.1/input/input16
    [2016-11-14 16:36:58]  hid-generic 0003:1A2C:0C23.0002: input,hidraw1: USB HID v1.10 Device [USB USB Keyboard] on usb-0000:00:1a.1-2/input1
    [root@london stats]#

正如我们所看到的——没有什么

已检查/var/日志/消息

Nov 14 15:01:01 london systemd: Removed slice user-0.slice.
Nov 14 15:01:01 london systemd: Stopping user-0.slice.
Nov 14 16:01:01 london systemd: Created slice user-0.slice.
Nov 14 16:01:01 london systemd: Starting user-0.slice.
Nov 14 16:01:01 london systemd: Started Session 171 of user root.
Nov 14 16:01:01 london systemd: Starting Session 171 of user root.
Nov 14 16:01:01 london systemd: Removed slice user-0.slice.
Nov 14 16:01:01 london systemd: Stopping user-0.slice.
Nov 14 16:05:24 london smbd[6249]: [2016/11/14 16:05:24.098079,  0] ../source3/smbd/oplock.c:700(oplock_timeout_handler)
Nov 14 16:05:24 london smbd[6249]:  Oplock break failed for file Z_Drive/BackUp/...... DC.lnk -- replying anyway
Nov 14 16:05:54 london smbd[6249]: [2016/11/14 16:05:54.133612,  0] ../source3/smbd/oplock.c:700(oplock_timeout_handler)
Nov 14 16:05:54 london smbd[6249]:  Oplock break failed for file Z_Drive/BackUp/..... X8.lnk -- replying anyway
.
.
.
.
Nov 14 16:36:57 london kernel: usb 4-2: new low-speed USB device number 2 using uhci_hcd
Nov 14 16:36:57 london kernel: usb 4-2: New USB device found, idVendor=1a2c, idProduct=0c23
Nov 14 16:36:57 london kernel: usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 14 16:36:57 london kernel: usb 4-2: Product: USB Keyboard
Nov 14 16:36:57 london kernel: usb 4-2: Manufacturer: USB

正如我们所看到的,这里也什么也没有。有很多失败的消息smbd恶魔关于断开的连接。但我认为这不适合我们。

系统控制告诉我们网络好的也。 10 月 14 日没有任何条目。

   ● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: active (exited) since Tue 2016-11-08 01:53:35 MSK; 6 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 925 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Nov 08 01:53:32 london.local systemd[1]: Starting LSB: Bring up/down networking...
Nov 08 01:53:32 london.local network[925]: Bringing up loopback interface:  Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 08 01:53:33 london.local network[925]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 08 01:53:33 london.local network[925]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 08 01:53:33 london.local network[925]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Nov 08 01:53:33 london.local network[925]: [  OK  ]
Nov 08 01:53:35 london.local network[925]: Bringing up interface enp2s0:  [  OK  ]
Nov 08 01:53:35 london.local systemd[1]: Started LSB: Bring up/down networking.

这里是用于调查的附加数据

内核信息

3.10.0-327.36.3.el7.x86_64

操作系统信息

CentOS Linux release 7.2.1511 (Core)

网络信息

dmesg | grep -i '以太网'

[root@london /]# dmesg | grep -i 'Ethernet'
[    1.327135] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.327619] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[root@london /]#

modinfo r8169

[root@london /]# modinfo r8169
filename:       /lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek/r8169.ko
firmware:       rtl_nic/rtl8107e-2.fw
firmware:       rtl_nic/rtl8107e-1.fw
firmware:       rtl_nic/rtl8168h-2.fw
firmware:       rtl_nic/rtl8168h-1.fw
firmware:       rtl_nic/rtl8168g-3.fw
firmware:       rtl_nic/rtl8168g-2.fw
firmware:       rtl_nic/rtl8106e-2.fw
firmware:       rtl_nic/rtl8106e-1.fw
firmware:       rtl_nic/rtl8411-2.fw
firmware:       rtl_nic/rtl8411-1.fw
firmware:       rtl_nic/rtl8402-1.fw
firmware:       rtl_nic/rtl8168f-2.fw
firmware:       rtl_nic/rtl8168f-1.fw
firmware:       rtl_nic/rtl8105e-1.fw
firmware:       rtl_nic/rtl8168e-3.fw
firmware:       rtl_nic/rtl8168e-2.fw
firmware:       rtl_nic/rtl8168e-1.fw
firmware:       rtl_nic/rtl8168d-2.fw
firmware:       rtl_nic/rtl8168d-1.fw
version:        2.3LK-NAPI
license:        GPL
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <[email protected]>
rhelversion:    7.2
srcversion:     17C11305BF371984CB1A920
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004302sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:        mii
intree:         Y
vermagic:       3.10.0-327.36.3.el7.x86_64 SMP mod_unload modversions
signer:         CentOS Linux kernel signing key
sig_key:        DD:8A:C3:DE:FE:A6:07:A6:13:C9:58:35:D0:37:19:40:E7:75:43:CF
sig_hashalgo:   sha256
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)
[root@london /]#

LSPCI | grep 网络

[root@london /]# lspci | grep net
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)
02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)
[root@london /]#

lshw级网络

[root@london av]# lshw -class net
  *-network:0 UNCLAIMED
       description: Ethernet controller
       product: RTL-8110SC/8169SC Gigabit Ethernet
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 10
       width: 32 bits
       clock: 66MHz
       capabilities: pm cap_list
       configuration: latency=32 maxlatency=64 mingnt=32
       resources: ioport:ce00(size=256) memory:fddff000-fddff0ff memory:fdd00000-fdd1ffff
  *-network:1 UNCLAIMED
       description: Ethernet controller
       product: RTL-8110SC/8169SC Gigabit Ethernet
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 1
       bus info: pci@0000:02:01.0
       version: 10
       width: 32 bits
       clock: 66MHz
       capabilities: pm cap_list
       configuration: latency=64 maxlatency=64 mingnt=32
       resources: ioport:cc00(size=256) memory:fddfe000-fddfe0ff memory:fdd20000-fdd3ffff
  *-network:2
       description: Ethernet interface
       product: SMC2-1211TX
       vendor: Accton Technology Corporation
       physical id: 3
       bus info: pci@0000:02:03.0
       logical name: enp2s3
       version: 10
       serial: 00:10:b5:c0:43:bb
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=full ip=192.168.1.4 latency=32 link=yes maxlatency=64 mingnt=32 multicast=yes port=MII speed=100Mbit/s
       resources: irq:22 ioport:ca00(size=256) memory:fddfc000-fddfc0ff
[root@london av]#

ethtool enp2s0

[root@london /]# ethtool enp2s0
Settings for enp2s0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes
[root@london /]#

接口配置

root@london stats]# cat /etc/sysconfig/network-scripts/ifcfg-enp2s0
TYPE="Ethernet"
BOOTPROTO="none"
IPADDR="192.168.1.4"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.101"
DNS1="192.168.1.101"
DNS2="8.8.8.8"
IPV4_FAILURE_FATAL="no"
NAME="enp2s0"
UUID="d9ca6b87-aa3c-4581-bfa8-4fcbebd78e06"
DEVICE="enp2s0"
ONBOOT="yes"
NM_CONTROLLED="no"


[root@london stats]#

服务器角色是桑巴分享 没有 IPTables,SELinux 已关闭。

所以问题是:

  1. 这个问题的根本原因是什么?
  2. 我应该采取什么方式来解决这个问题?
  3. 我是否应该遵循这些步骤是否解决问题

如果需要其他信息,请告诉我。欢迎所有建议。请帮忙。提前致谢。

相关内容