ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.92k stars 1.9k forks source link

和外网断开连接 #1045

Closed cellistV closed 1 year ago

cellistV commented 1 year ago

Device Information | 设备信息

SOC: [s905l3a] Model [M401a] Armbian Version | 系统版本

Kernel Version: [5.15.92-flippy-81+o] Release: [jammy]

问题描述 开机一段时间后和外网断开,执行armbian-sync 返回svn: E000101: Error running context: Network is unreachable ping任何网站都不通 IP ,MAC地址已固定,networkmanger enable状态 重启后一切正常,过一段时间就会断开(2-3小时 image 请大佬帮忙,应该从什么方向排查

ophub commented 1 year ago

提问有标准模板,你不按模板反馈问题,让大家怎么猜你的运行环境呢?

ls -l /boot/u-boot* cat /boot/uEnv.txt cat /etc/ophub-release

cellistV commented 1 year ago

抱歉,已按模板更改

ls -l /boot/u-boot*

root@armbian:~# ls -l /boot/u-boot*
-rwxr-xr-x 1 root root 704408 Feb  1 09:40 /boot/u-boot-e900v22c.bin
-rwxr-xr-x 1 root root 704408 Feb  1 09:40 /boot/u-boot.ext
-rwxr-xr-x 1 root root 757153 Feb  1 09:40 /boot/u-boot-gtking.bin
-rwxr-xr-x 1 root root 757080 Feb  1 09:40 /boot/u-boot-gtkingpro.bin
-rwxr-xr-x 1 root root 735459 Feb  1 09:40 /boot/u-boot-gtkingpro-rev-a.bin
-rwxr-xr-x 1 root root 702771 Feb  1 09:40 /boot/u-boot-n1.bin
-rwxr-xr-x 1 root root 761012 Feb  1 09:40 /boot/u-boot-odroid-n2.bin
-rwxr-xr-x 1 root root 553489 Feb  1 09:40 /boot/u-boot-p201.bin
-rwxr-xr-x 1 root root 606670 Feb  1 09:40 /boot/u-boot-p212.bin
-rwxr-xr-x 1 root root 609247 Feb  1 09:40 /boot/u-boot-s905.bin
-rwxr-xr-x 1 root root 740080 Feb  1 09:40 /boot/u-boot-s905x2-s922.bin
-rwxr-xr-x 1 root root 650183 Feb  1 09:40 /boot/u-boot-s905x-s912.bin
-rwxr-xr-x 1 root root 709768 Feb  1 09:40 /boot/u-boot.sd
-rwxr-xr-x 1 root root 754378 Feb  1 09:40 /boot/u-boot-sei510.bin
-rwxr-xr-x 1 root root 754384 Feb  1 09:40 /boot/u-boot-sei610.bin
-rwxr-xr-x 1 root root 880672 Feb  1 09:40 /boot/u-boot-skyworth-lb2004.bin
-rwxr-xr-x 1 root root 758664 Feb  1 09:40 /boot/u-boot-tx3-bz.bin
-rwxr-xr-x 1 root root 759112 Feb  1 09:40 /boot/u-boot-tx3-qz.bin
-rwxr-xr-x 1 root root 694755 Feb  1 09:40 /boot/u-boot-u200.bin
-rwxr-xr-x 1 root root 877080 Feb  1 09:40 /boot/u-boot-ugoos-x3.bin
-rwxr-xr-x 1 root root 709768 Feb  1 09:40 /boot/u-boot.usb
-rwxr-xr-x 1 root root 748175 Feb  1 09:40 /boot/u-boot-x96max.bin
-rwxr-xr-x 1 root root 746678 Feb  1 09:40 /boot/u-boot-x96maxplus.bin
-rwxr-xr-x 1 root root 703444 Feb  1 09:40 /boot/u-boot-zyxq.bin

cat /boot/uEnv.txt

root@armbian:~# cat /boot/uEnv.txt
LINUX=/zImage
INITRD=/uInitrd
FDT=/dtb/amlogic/meson-g12a-s905l3a-m401a.dtb
APPEND=root=UUID=c8f6687b-cd67-4498-80ea-30d5137611ec rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

cat /etc/ophub-release

root@armbian:~# cat /etc/ophub-release
PLATFORM='amlogic'
VERSION_CODEID='ubuntu'
VERSION_CODENAME='jammy'
SOC='s905l3a'
MODEL_NAME='E900V22C-D'
FDTFILE='meson-g12a-s905l3a-m401a.dtb'
UBOOT_OVERLOAD='u-boot-e900v22c.bin'
MAINLINE_UBOOT='/usr/lib/u-boot/'
BOOTLOADER_IMG='/usr/lib/u-boot/'
FAMILY='meson-g12a'
BOARD='s905l3a'
KERNEL_VERSION='5.15.92'
KERNEL_BRANCH='stable'
K510='0'
ROOTFS_TYPE='ext4'
BOOT_CONF='uEnv.txt'
DISK_TYPE='emmc'
MLUBOOT_STATUS='no'
AMPART_STATUS='yes'
PACKAGED_DATE='2023-01-18'
ophub commented 1 year ago

找不出毛病,设置都对。

cellistV commented 1 year ago

找不出毛病,设置都对。 真是怪了,两天了,开始还以为装的docker有问题,现在发现是设备本身不能连外网。重启就一切都好了 发现刚才断的时候nmcli device show 看不到 IPV4 GATE.WAY image 现在重启 却能正常显示出GATE.WAY的地址 image

7Ji commented 1 year ago

IP ,MAC地址已固定

192.198.100.112/24

这个固定的地址怎么这么高?你是在设备端固定还是DHCP服务器固定的?你的路由器是不是OpenWrt的?或者是类似的使用dnsmasq提供DHCP服务的? 之所以这么问,是因为OpenWrt里默认的DHCP地址池是.100起步的150位,如果你的网络环境正好是这样:

那么在你原来获得这个地址的租约到期之后,DHCP服务器会把你的这个.112的地址再分给其他设备,且发出一次DHCP宣告,告知.112分配给了新设备。这会导致各种各样的网络问题。2~3小时也比较像默认的DHCP租约的时间

cellistV commented 1 year ago

IP ,MAC地址已固定

192.198.100.112/24

这个固定的地址怎么这么高?你是在设备端固定还是DHCP服务器固定的?你的路由器是不是OpenWrt的?或者是类似的使用dnsmasq提供DHCP服务的? 之所以这么问,是因为OpenWrt里默认的DHCP地址池是.100起步的150位,如果你的网络环境正好是这样:

  • DHCP服务器的地址池包括了你在用的这个地址
  • 你的地址仅在设备端设置了固定IP
  • 你没有在DHCP服务器那边给这个地址设置静态租约

那么在你原来获得这个地址的租约到期之后,DHCP服务器会把你的这个.112的地址再分给其他设备,且发出一次DHCP宣告,告知.112分配给了新设备。这会导致各种各样的网络问题。2~3小时也比较像默认的DHCP租约的时间

感谢回复 没错,路由器是openwrt也启用了dnsmasq提供DHCP服务,但是在这个问题出现之前路由器已经把M401A的mac和ip绑定设为静态地址,问题出现后也关闭dnsmasq,但并没有起作用。 昨晚试了关闭某个容器的自动更新,问题没有再复现。

cellistV commented 1 year ago

已解决,‘nas-tools’这个容器的自动更新功能关闭后,问题没有再复现 BUG 2023-02-12 085323 不知道具体原因,猜测容器和设备使用不同源有关