Closed blog2020 closed 9 months ago
mosdns文件:
config mosdns 'config' option listen_port '5335' option geo_auto_update '0' option geo_update_week_time '*' option geo_update_day_time '2' option configfile '/etc/mosdns/config.yaml' option log_level 'info' option logfile '/var/log/mosdns.log' option cache_size '8000' option cache_survival_time '86400' option dump_file '0' option concurrent '1' option idle_timeout '30' option minimal_ttl '0' option maximum_ttl '0' option enable_pipeline '0' option insecure_skip_verify '0' option cloudflare '0' option listen_port_api '9091' list remote_dns 'tls://8.8.8.8' list remote_dns 'tls://1.1.1.1' option bootstrap_dns '223.5.5.5' option enable_ecs_remote '0' option dns_leak '1' option enabled '1' option redirect '0' option adblock '0' option custom_local_dns '1' option apple_optimization '0' list local_dns '223.5.5.5'
日志文件: 2024-01-10 18:01:06 INFO unpacking entry {"tag": "cn", "length": 11251, "file": "/var/mosdns/geoip_cn.txt"} fatal error: runtime: out of memory
runtime stack: runtime.throw({0x795b27?, 0x425244?}) runtime/panic.go:1077 +0x40 fp=0x400004fdd0 sp=0x400004fda0 pc=0x437650 runtime.sysMapOS(0x4001400000, 0x400000?) runtime/mem_linux.go:167 +0xec fp=0x400004fe20 sp=0x400004fdd0 pc=0x4182fc runtime.sysMap(0xab6d48?, 0x1?, 0x2b?) runtime/mem.go:155 +0x34 fp=0x400004fe50 sp=0x400004fe20 pc=0x417d34 runtime.(mheap).grow(0xab6d40, 0x4328a0?) runtime/mheap.go:1533 +0x278 fp=0x400004fed0 sp=0x400004fe50 pc=0x42a818 runtime.(mheap).allocSpan(0xab6d40, 0x1, 0x0, 0xb2?) runtime/mheap.go:1250 +0x164 fp=0x400004ff70 sp=0x400004fed0 pc=0x429dd4 runtime.(*mheap).alloc.func1() runtime/mheap.go:968 +0x6c fp=0x400004ffc0 sp=0x400004ff70 pc=0x4298bc traceback: unexpected SPWRITE function runtime.systemstack runtime.systemstack() runtime/asm_arm64.s:243 +0x6c fp=0x400004ffd0 sp=0x400004ffc0 pc=0x46778c
goroutine 1 [running]: runtime.systemstack_switch() runtime/asm_arm64.s:200 +0x8 fp=0x400006cfa0 sp=0x400006cf90 pc=0x467708 runtime.(mheap).alloc(0x400006d028?, 0x4172cc?, 0x28?) runtime/mheap.go:962 +0x54 fp=0x400006cff0 sp=0x400006cfa0 pc=0x429814 runtime.(mcentral).grow(0x40013f7740?) runtime/mcentral.go:246 +0x5c fp=0x400006d030 sp=0x400006cff0 pc=0x4176fc runtime.(mcentral).cacheSpan(0xac7f88) runtime/mcentral.go:166 +0x318 fp=0x400006d0a0 sp=0x400006d030 pc=0x417558 runtime.(mcache).refill(0x7f97317108, 0x10?) runtime/mcache.go:182 +0x1bc fp=0x400006d0f0 sp=0x400006d0a0 pc=0x416bdc runtime.(mcache).nextFree(0x7f97317108, 0x10) runtime/malloc.go:925 +0x84 fp=0x400006d140 sp=0x400006d0f0 pc=0x40dc64 runtime.mallocgc(0x58, 0x76e6c0, 0x1) runtime/malloc.go:1112 +0x424 fp=0x400006d1b0 sp=0x400006d140 pc=0x40e1e4 reflect.unsafe_New(0x400006d208?) runtime/malloc.go:1329 +0x2c fp=0x400006d1e0 sp=0x400006d1b0 pc=0x463a2c reflect.New({0x838188?, 0x76e6c0}) reflect/value.go:3256 +0x5c fp=0x400006d210 sp=0x400006d1e0 pc=0x49de2c google.golang.org/protobuf/internal/impl.consumeMessageSliceInfo({0x40002b42ba?, 0xccc9d?, 0x35c5a0?}, {0x40010fc588?}, 0x2?, 0x4000000868, {0x0?, {0x830778?, 0x400007e390?}, 0x270e?}) google.golang.org/protobuf@v1.28.1/internal/impl/codec_field.go:501 +0x80 fp=0x400006d2d0 sp=0x400006d210 pc=0x5e7580 google.golang.org/protobuf/internal/impl.(MessageInfo).unmarshalPointer(0x40000a2520, {0x4000261bd7?, 0x111a52, 0x502f2a?}, {0x786280?}, 0x0, {0x0, {0x830778?, 0x400007e390?}, 0x0?}) google.golang.org/protobuf@v1.28.1/internal/impl/decode.go:148 +0x2f0 fp=0x400006d430 sp=0x400006d2d0 pc=0x610040 google.golang.org/protobuf/internal/impl.consumeMessageSliceInfo({0x4000261bd4?, 0x838188?, 0x70f7c0?}, {0xffffffffffffffff?}, 0x0?, 0x40000ca120, {0x10?, {0x830778?, 0x400007e390?}, 0xffffffffffffffff?}) google.golang.org/protobuf@v1.28.1/internal/impl/codec_field.go:503 +0xc4 fp=0x400006d4f0 sp=0x400006d430 pc=0x5e75c4 google.golang.org/protobuf/internal/impl.(MessageInfo).unmarshalPointer(0x40000a2668, {0x4000100000?, 0x502f2b, 0x70f7c0?}, {0xffffffffffffffff?}, 0x0, {0x0, {0x830778?, 0x400007e390?}, 0x70b2a0?}) google.golang.org/protobuf@v1.28.1/internal/impl/decode.go:148 +0x2f0 fp=0x400006d650 sp=0x400006d4f0 pc=0x610040 google.golang.org/protobuf/internal/impl.(MessageInfo).unmarshal(0x0?, {{}, {0x835dd0, 0x4000086400}, {0x4000100000, 0x502f2b, 0x502f2c}, 0x0, {0x830778, 0x400007e390}, ...}) google.golang.org/protobuf@v1.28.1/internal/impl/decode.go:66 +0xa0 fp=0x400006d6b0 sp=0x400006d650 pc=0x60fcc0 google.golang.org/protobuf/internal/impl.(*MessageInfo).unmarshal-fm({{}, {0x835dd0, 0x4000086400}, {0x4000100000, 0x502f2b, 0x502f2c}, 0x0, {0x830778, 0x400007e390}, 0x2710})
Openwrt: 固件版本 QWRT R23.8.1 / LuCI Master (git-23.194.57997-26d16e6) 内核版本: 5.4.249
内存: 可用数 277MB/480MB(57%) 已缓存 19MB/480MB(3%)
Filesystem Size Used Available Use% Mounted on /dev/root 33.0M 33.0M 0 100% /rom tmpfs 240.4M 5.4M 234.9M 2% /tmp /dev/ubi0_2 64.3M 40.8M 20.1M 67% /overlay overlayfs:/overlay 64.3M 40.8M 20.1M 67% / tmpfs 512.0K 0 512.0K 0% /dev cgroup 240.4M 0 240.4M 0% /sys/fs/cgroup
系统日志里不断有这提示:
Thu Jan 11 02:46:34 2024 daemon.err mosdns[24114]: 2024-01-10T18:46:34.835Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:34 2024 daemon.err mosdns[24114]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:34 2024 daemon.err mosdns[24114]: 2024-01-10T18:46:34.837Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:39 2024 daemon.err mosdns[24164]: 2024-01-10T18:46:39.860Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:39 2024 daemon.err mosdns[24164]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:39 2024 daemon.err mosdns[24164]: 2024-01-10T18:46:39.862Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:44 2024 daemon.err mosdns[24171]: 2024-01-10T18:46:44.884Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:44 2024 daemon.err mosdns[24171]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:44 2024 daemon.err mosdns[24171]: 2024-01-10T18:46:44.886Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:49 2024 daemon.err mosdns[24175]: 2024-01-10T18:46:49.911Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:49 2024 daemon.err mosdns[24175]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:49 2024 daemon.err mosdns[24175]: 2024-01-10T18:46:49.917Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:54 2024 daemon.err mosdns[24216]: 2024-01-10T18:46:54.942Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:54 2024 daemon.err mosdns[24216]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:54 2024 daemon.err mosdns[24216]: 2024-01-10T18:46:54.944Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:59 2024 daemon.err mosdns[24220]: 2024-01-10T18:46:59.969Z INFO main config loaded {"file": "/etc/mosdns/config.yaml"} Thu Jan 11 02:46:59 2024 daemon.err mosdns[24220]: Error: failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:59 2024 daemon.err mosdns[24220]: 2024-01-10T18:46:59.971Z FATAL failed to init plugin #0 geosite_cn, failed to init plugin: failed to load file #0 /var/mosdns/geosite_cn.txt, open /var/mosdns/geosite_cn.txt: no such file or directory Thu Jan 11 02:46:59 2024 daemon.info procd: Instance mosdns::mosdns s in a crash loop 6 crashes, 0 seconds since last crash
tmpfs 空间不足以存放 geodata 数据库解包,去找一个不依赖 v2dat 的 mosdns 即可(说人话就是除了我这个luci,其他所有作者的 mosdns 都可以)
tmpfs 空间不足以存放 geodata 数据库解包,去找一个不依赖 v2dat 的 mosdns 即可(说人话就是除了我这个luci,其他所有作者的 mosdns 都可以)
不太懂openwrt,请问一下大佬,是哪个空间满了?有两个tmpfs
内存: 可用数 277MB/480MB(57%) 已缓存 19MB/480MB(3%)
Filesystem Size Used Available Use% Mounted on /dev/root 33.0M 33.0M 0 100% /rom tmpfs 240.4M 5.4M 234.9M 2% /tmp /dev/ubi0_2 64.3M 40.8M 20.1M 67% /overlay overlayfs:/overlay 64.3M 40.8M 20.1M 67% / tmpfs 512.0K 0 512.0K 0% /dev cgroup 240.4M 0 240.4M 0% /sys/fs/cgroup
/tmp
发自我的iPhone
在 2024年1月11日,16:45,blog2020 @.***> 写道:
tmpfs 空间不足以存放 geodata 数据库解包,去找一个不依赖 v2dat 的 mosdns 即可(说人话就是除了我这个luci,其他所有作者的 mosdns 都可以)
不太懂openwrt,请问一下大佬,是哪个空间满了?有两个tmpfs
内存: 可用数 277MB/480MB(57%) 已缓存 19MB/480MB(3%)
Filesystem Size Used Available Use% Mounted on /dev/root 33.0M 33.0M 0 100% /rom tmpfs 240.4M 5.4M 234.9M 2% /tmp /dev/ubi0_2 64.3M 40.8M 20.1M 67% /overlay overlayfs:/overlay 64.3M 40.8M 20.1M 67% / tmpfs 512.0K 0 512.0K 0% /dev cgroup 240.4M 0 240.4M 0% /sys/fs/cgroup
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
/tmp 发自我的iPhone … 在 2024年1月11日,16:45,blog2020 @.***> 写道: tmpfs 空间不足以存放 geodata 数据库解包,去找一个不依赖 v2dat 的 mosdns 即可(说人话就是除了我这个luci,其他所有作者的 mosdns 都可以) 不太懂openwrt,请问一下大佬,是哪个空间满了?有两个tmpfs 内存: 可用数 277MB/480MB(57%) 已缓存 19MB/480MB(3%) Filesystem Size Used Available Use% Mounted on /dev/root 33.0M 33.0M 0 100% /rom tmpfs 240.4M 5.4M 234.9M 2% /tmp /dev/ubi0_2 64.3M 40.8M 20.1M 67% /overlay overlayfs:/overlay 64.3M 40.8M 20.1M 67% / tmpfs 512.0K 0 512.0K 0% /dev cgroup 240.4M 0 240.4M 0% /sys/fs/cgroup — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
tmp好像是内存虚拟出来的?内存显示还有一半可用,我也搞不懂。 不过已经弄好了,目前运行正常,dns 泄漏也解决了, 非常感谢大佬制作这么好的项目, 我看了这个项目 https://github.com/QiuSimons/openwrt-mos 好像只提供了x86的版本,还是大佬照顾我们菜鸟,再次感谢!
config.yaml文件: log: level: info file: "/var/log/mosdns.log"
api: http: "0.0.0.0:9091"
include: []
plugins:
tag: geosite_cn type: domain_set args: files:
tag: geoip_cn type: ip_set args: files:
tag: geosite_apple type: domain_set args: files:
tag: geosite_no_cn type: domain_set args: files:
tag: whitelist type: domain_set args: files:
tag: blocklist type: domain_set args: files:
tag: greylist type: domain_set args: files:
tag: ddnslist type: domain_set args: files:
tag: hosts type: hosts args: files:
tag: redirect type: redirect args: files:
tag: adlist type: domain_set args: files:
tag: local_ptr type: domain_set args: files:
tag: cloudflare_cidr type: ip_set args: files:
tag: lazy_cache type: cache args: size: 8000 lazy_cache_ttl: 86400
tag: forward_xinfeng_udp type: forward args: concurrent: 2 upstreams:
tag: forward_local type: forward args: concurrent: 1 upstreams:
tag: forward_remote type: forward args: concurrent: 1 upstreams:
tag: forward_remote_upstream type: sequence args:
tag: modify_ttl type: sequence args:
tag: modify_ddns_ttl type: sequence args:
tag: has_resp_sequence type: sequence args:
tag: query_is_non_local_ip type: sequence args:
tag: fallback type: fallback args: primary: forward_remote_upstream secondary: forward_remote_upstream threshold: 500 always_standby: true
tag: apple_domain_fallback type: fallback args: primary: query_is_non_local_ip secondary: forward_xinfeng_udp threshold: 100 always_standby: true
tag: query_is_apple_domain type: sequence args:
tag: query_is_ddns_domain type: sequence args:
tag: query_is_local_domain type: sequence args:
tag: query_is_no_local_domain type: sequence args:
tag: query_is_whitelist_domain type: sequence args:
tag: query_is_greylist_domain type: sequence args:
tag: query_is_reject_domain type: sequence args:
tag: main_sequence type: sequence args:
tag: udp_server type: udp_server args: entry: main_sequence listen: ":5335"
tag: tcp_server type: tcp_server args: entry: main_sequence listen: ":5335"