IrineSistiana / mosdns

一个 DNS 转发器
GNU General Public License v3.0
2.89k stars 326 forks source link

[Bug] failed to unpack geoip #832

Open jinny8251 opened 1 month ago

jinny8251 commented 1 month ago

在提交之前,请确认

mosdns 版本

5.3.1

操作系统

openwrt

Bug 描述和复现步骤

提示成功更新geoip

使用的配置文件

openwrt可视化

mosdns 的 log 记录

2024-08-17 03:21:55 FATAL   failed to unpack geoip  {"error": "open /usr/share/v2ray/geoip.dat: no such file or directory"}
github.com/urlesistiana/v2dat/cmd/unpack.newGeoIPCmd.func1
    github.com/urlesistiana/v2dat/cmd/unpack/geoip.go:25
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.6.1/command.go:920
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.6.1/command.go:968
main.main
    github.com/urlesistiana/v2dat/main.go:9
runtime.main
    runtime/proc.go:267
2024-08-17 03:21:55 FATAL   failed to unpack geosite    {"error": "open /usr/share/v2ray/geosite.dat: no such file or directory"}
github.com/urlesistiana/v2dat/cmd/unpack.newGeoSiteCmd.func1
    github.com/urlesistiana/v2dat/cmd/unpack/geosite.go:30
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.6.1/command.go:920
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.6.1/command.go:968
main.main
    github.com/urlesistiana/v2dat/main.go:9
runtime.main
    runtime/proc.go:267
devome commented 1 month ago

这是luci-app-mosdns的问题,不是mosdns的问题,你提错地方了。所以你勾选我非常确定这是 mosdns 核心的问题。(如果是通过第三方衍生软件使用 mosdns 核心,不确定问题源头时,请先向衍生软件开发者提交问题。)完全没有思考。

lengfwong commented 1 month ago

提示没有/usr/share/v2ray/geoip.dat文件,缺v2ray-geoip.ipk和V2ray-geosite.ipk

sbwml commented 1 month ago

你应该去检查是否有其它插件对 geodata 数据库有更新操作,并且它更新失败了,就会直接导致上述问题。

这种情况只需关闭其它所有会更新 geodata 数据库的插件相关功能,在 mosdns luci 自带的数据库更新中完成一次手动更新,它就能恢复正常使用。

ps:mosdns luci 的数据库更新有防呆处理,因网络问题下载数据库失败/不完整,它会停止对数据库文件做更改,而不会使用不完整的数据去强制替换。所以如果有自动更新需求,只需单启用 mosdns 的计划任务即可。