没有合盖,也连dc电源(合盖会直接休眠了)。 目前断开连接后会过会儿自动重连,大概10~20分钟之间会随机断开。
(刚刚又发生断连了)
没有合盖,也连dc电源(合盖会直接休眠了)。 目前断开连接后会过会儿自动重连,大概10~20分钟之间会随机断开。
(刚刚又发生断连了)
@george 是上周淘宝店买的预装的 ubuntu 24.04. (你截图第二个文件)
linux 内核是从这里编译了内核: https://github.com/coolpi-george/coolpi-kernel, 加了一些 网络协议的支持(NFT,dockerd服务必须要开启的)
> lshw
......
*-network
description: Wireless interface
physical id: 12
bus info: pci@0002:21:00.0
logical name: wlan1
serial: c2:4b:24:02:8c:2b
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8852be driverversion=v1.15.10.0.2-1-gef8cc86f5.20220 firmware=N/A link=no multicast=yes wireless=unassociated
使用cloudflared tunnel 实现内网穿透。从cloudflare管理界面看,家里的那台笔记本(cool pi)与cloudflare网络频繁断开,导致我远程连接失败。(可以从cloudflare管理界面看到 笔记本最近一次连接的时间)
如图:上边的为 coolpi笔记本,下边的为另一个设备,也是放家里,在同一个网络。也排查过 coolpi上的cloudflared服务本身未发生重启。
使用 linux 6.1,网卡为默认的 Realtek 8852BE (rtl8852be),使用ssh远程连接笔记本,经常操作期间就断开连接,频率还很高。这个是驱动问题,还是这个网卡本身存在问题?
同样我在办公环境连家里的另一台设备,未出现此问题,可以排除网络本身的因素。
经过测试,加了 nft 的内核配置后,可以正常运行dockerd了。
> diff .config-bjr-addnft .config
1063d1062
< CONFIG_NETFILTER_NETLINK=y
1065d1063
< # CONFIG_NETFILTER_NETLINK_HOOK is not set
1098,1120c1096
< CONFIG_NF_TABLES=y
< # CONFIG_NF_TABLES_INET is not set
< # CONFIG_NF_TABLES_NETDEV is not set
< # CONFIG_NFT_NUMGEN is not set
< CONFIG_NFT_CT=y
< # CONFIG_NFT_CONNLIMIT is not set
< # CONFIG_NFT_LOG is not set
< # CONFIG_NFT_LIMIT is not set
< CONFIG_NFT_MASQ=y
< CONFIG_NFT_REDIR=y
< CONFIG_NFT_NAT=y
< # CONFIG_NFT_TUNNEL is not set
< # CONFIG_NFT_OBJREF is not set
< # CONFIG_NFT_QUOTA is not set
< # CONFIG_NFT_REJECT is not set
< CONFIG_NFT_COMPAT=y
< # CONFIG_NFT_HASH is not set
< # CONFIG_NFT_XFRM is not set
< # CONFIG_NFT_SOCKET is not set
< # CONFIG_NFT_OSF is not set
< # CONFIG_NFT_TPROXY is not set
< # CONFIG_NFT_SYNPROXY is not set
< # CONFIG_NF_FLOW_TABLE is not set
---
> # CONFIG_NF_TABLES is not set
1261,1264d1236
< CONFIG_NF_TABLES_IPV4=y
< # CONFIG_NFT_DUP_IPV4 is not set
< # CONFIG_NFT_FIB_IPV4 is not set
< # CONFIG_NF_TABLES_ARP is not set
1294d1265
< # CONFIG_NF_TABLES_IPV6 is not set
1302d1272
< # CONFIG_NF_TABLES_BRIDGE is not set
docker 运行正常
> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff206fdf473a rancher/k3s:v1.30.3-k3s1 "/bin/k3d-entrypoint…" 2 days ago Up 8 minutes k3d-freshncp-server-0
78f859e5c98b registry:2 "/entrypoint.sh /etc…" 2 days ago Up 8 minutes 0.0.0.0:39301->5000/tcp k3d-registry
> uname -a
Linux freshncp 6.1.75 #6 SMP Sun Aug 18 20:01:41 CST 2024 aarch64 aarch64 aarch64 GNU/Linux
@george 这个是5.10下的:
lsmod
Module Size Used by
xt_nat 16384 5
veth 24576 0
xt_conntrack 16384 2
nft_chain_nat 16384 7
xt_MASQUERADE 16384 3
nf_nat 36864 3 xt_nat,nft_chain_nat,xt_MASQUERADE
nf_conntrack_netlink 40960 0
nf_conntrack 135168 5 xt_conntrack,nf_nat,xt_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nft_counter 16384 33
xt_addrtype 16384 2
nft_compat 20480 12
nf_tables 180224 132 nft_compat,nft_counter,nft_chain_nat
br_netfilter 24576 0
btusb 53248 0
btrtl 20480 1 btusb
btbcm 20480 1 btusb
8852be 3993600 0
btintel 20480 1 btusb
dm_mod 114688 0
nfnetlink 20480 5 nft_compat,nf_conntrack_netlink,nf_tables
所以 6.1的还得配置 nft,否则nft不可用,docker也不可用了。
@plumlis 6.1 用 george 发的链接更新 能正常不黑屏;5.10 用新的会黑屏,用备份的是ok的。
@plumlis 6.1内核,我试了下,有声音(Headerphone),但麦克风不工作(看不到speaker)
我现在恢复到 5.10了,等稳定了再说。关于 iptable、nft 不能正常工作导致dockerd启动失败的问题,后边尝试改 内核编译配置验证了。
uname -a
Linux freshncp 6.1.75 #1 SMP Sun Aug 18 02:12:55 CST 2024 aarch64 aarch64 aarch64 GNU/Linux
之前的 5.10.110 是正常启动dockerd服务 的
发现 dockerd启动失败,原因是iptables失败了,是否是内核未添加 nftables 的支持?
INFO[2024-08-18T11:25:10.884899381+08:00] Starting up
INFO[2024-08-18T11:25:10.885740562+08:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2024-08-18T11:25:10.900679110+08:00] [graphdriver] using prior storage driver: overlay2
INFO[2024-08-18T11:25:10.908166906+08:00] Loading containers: start.
INFO[2024-08-18T11:25:10.955936893+08:00] unable to detect if iptables supports xlock: 'iptables --wait -L -n': `iptables: Failed to initialize nft: Protocol not supported` error="exit status 1"
INFO[2024-08-18T11:25:11.035561219+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables: Failed to initialize nft: Protocol not supported
(exit status 1)
INFO[2024-08-18T11:25:11.036588487+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
从这里编译了内核: https://github.com/coolpi-george/coolpi-kernel
./build-kernel.sh
sudo cp -r ./out/* /boot/firmware/ # 旧目录已经备份