vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
17.51k stars 3.18k forks source link

在19.07版本代码下,GEOIP数据库下载失败 #123

Closed ghost closed 4 years ago

ghost commented 4 years ago

之前一直用Lean的18.06版本编译,一切正常。 昨天换成官方的19.07正式版编译,其他运行都正常,就是数据库下载失败。

我直接把openclash_ipdb.sh里的wget下载命令抽出来在路由器执行,是可以成功下载数据库的,所以网络状况是没问题的。但在设置页面点击更新后却总是提示下载失败,而且/tmp目录下确实也没下载到数据库文件。

尝试过把wget下载的重试次数增加到5,但没效果,似乎命令根本没有等待足够的超时时间,很快就结束并返回了下载失败。

没什么头绪,可能是哪里的问题呢?

vernesong commented 4 years ago

wget 的quiet参数去掉直接运行脚本,看是什么错误提示

ghost commented 4 years ago

只看到wget下载成功的返回信息,别的都没有.

root@OpenWrt:/tmp# ./openclash_ipdb.sh
--2020-01-19 16:41:16--  https://static.clash.to/GeoIP2/GeoIP2-Country.mmdb
Resolving static.clash.to... 198.18.0.26
Connecting to static.clash.to|198.18.0.26|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4255911 (4.1M) [application/octet-stream]
Saving to: '/tmp/Country.mmdb'

/tmp/Country.mmdb                  100%[==============================================================>]   4.06M  12.0MB/s    in 0.3s

2020-01-19 16:41:21 (12.0 MB/s) - '/tmp/Country.mmdb' saved [4255911/4255911]

/tmp/openclash_start.log文件的结果是正常的。

root@OpenWrt:/tmp# cat openclash.log

2020-01-19 16:51:38 Updated GEOIP Database No Change, Do Nothing

但从luci界面更新,openclash.log文件是报错了的:

root@OpenWrt:/tmp# cat openclash.log
time="2020-01-19T08:54:24Z" level=info msg="Start initial compatible provider AUTO"
time="2020-01-19T08:54:24Z" level=info msg="Start initial compatible provider TW"
time="2020-01-19T08:54:24Z" level=info msg="Start initial compatible provider US"
2020-01-19 16:54:24 OpenClash Start Successful
2020-01-19 16:54:19 GEOIP Database Update Error
vernesong commented 4 years ago

试试去掉开头的sh https://github.com/vernesong/OpenClash/blob/e63668ac954ccbce41cd08867ea10958a72a0141/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua#L320

ghost commented 4 years ago

删掉sh也是一样的,感觉这个脚本就没完整执行完。

tony1016 commented 4 years ago

不光是地理位置吧,我这里订阅、内核下载,都不行

ghost commented 4 years ago

因为问题很多,所以很早就退回18.06版本了,其他的下载确实也有问题,感觉就是下载脚本根本没执行完。

-- Sent from Canary (https://canarymail.io)

On 星期三, 1月 29, 2020 at 2:56 下午, tony1016 <notifications@github.com (mailto:notifications@github.com)> wrote:

不光是地理位置吧,我这里订阅、内核下载,都不行

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/vernesong/OpenClash/issues/123?email_source=notifications&email_token=AAI56YV5QYHFEHSMTVFGPDDRAESBZA5CNFSM4KIWSCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKGE6KA#issuecomment-579620648), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAI56YRRIE3VCHDLQJMNSB3RAESBZANCNFSM4KIWSCUA).

peterwjp2017 commented 4 years ago

不光是地理位置吧,我这里订阅、内核下载,都不行

如果你使用的是Snapshot的版本,使用opkg安装的openclash,请确保wget已经安装

image

tony1016 commented 4 years ago

并不是,stable版本

Peter Wang notifications@github.com 于 2020年2月4日周二 上午10:43写道:

不光是地理位置吧,我这里订阅、内核下载,都不行

如果你使用的是Snapshot的版本编译的,请确保安装了wget

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vernesong/OpenClash/issues/123?email_source=notifications&email_token=AAQ5SSVCERQ5UDNPIKQQWZ3RBDI4LA5CNFSM4KIWSCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKWEQAQ#issuecomment-581715970, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ5SSTKI7PMFSHGRO2N7HTRBDI4LANCNFSM4KIWSCUA .

ghost commented 4 years ago

这问题,并没有解决啊。。。 刚试过19.07.1版本代码,还是一样的,GEOIP数据库和clash核心更新都是失败的。

tony1016 commented 4 years ago

似乎解决了,新版本用了curl,我用了发现没问题了

毕勤 notifications@github.com 于 2020年2月21日周五 下午5:32写道:

这问题,并没有解决啊。。。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vernesong/OpenClash/issues/123?email_source=notifications&email_token=AAQ5SSW3W4HHKUM6XNSWCG3RD6NSJA5CNFSM4KIWSCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMSC4NQ#issuecomment-589573686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ5SSWXES7I4WG5SWIEYNDRD6NSJANCNFSM4KIWSCUA .

ghost commented 4 years ago

呃,看来我忘了装curl,回头再试试

-- Sent from Canary (https://canarymail.io)

On 星期五, 2月 21, 2020 at 7:45 下午, tony1016 <notifications@github.com (mailto:notifications@github.com)> wrote: 似乎解决了,新版本用了curl,我用了发现没问题了

毕勤 notifications@github.com 于 2020年2月21日周五 下午5:32写道:

这问题,并没有解决啊。。。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vernesong/OpenClash/issues/123?email_source=notifications&email_token=AAQ5SSW3W4HHKUM6XNSWCG3RD6NSJA5CNFSM4KIWSCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMSC4NQ#issuecomment-589573686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ5SSWXES7I4WG5SWIEYNDRD6NSJANCNFSM4KIWSCUA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/vernesong/OpenClash/issues/123?email_source=notifications&email_token=AAI56YSAZ3UI4JIMY2MFTT3RD65GFA5CNFSM4KIWSCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMSOIOY#issuecomment-589620283), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAI56YQB5EQVYIN5XCN464DRD65GFANCNFSM4KIWSCUA).

ghost commented 4 years ago

我试了一下,核心程序更新是正常的,但geoip数据库的下载和之前是一样的,依然失败。