NETGEAR R7800+OpenWrt 19.07.2+SS+ChinaDNS+DNS-forwarder+kcptun问题记录

最近趁公司网络调整,把OpenWrt的版本从17升级到了19.07.2,由于跨版本较大,干脆就直接重装了。

问题一:OpenWrt管理台无法打开

opkg install luci-compat

问题二:luci-app-kcptun 500错误

Failed to execute cbi dispatcher target for entry '/admin/services/kcptun/settings'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:97: Failed to execute template 'cbi/map'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'kcptun/status'.
A runtime error occurred: /usr/lib/lua/luci/model/kcptun.lua:49: module 'luci.model.ipkg' not found:
no field package.preload['luci.model.ipkg']
no file './luci/model/ipkg.lua'
no file '/usr/share/lua/luci/model/ipkg.lua'
no file '/usr/share/lua/luci/model/ipkg/init.lua'
no file '/usr/lib/lua/luci/model/ipkg.lua'
no file '/usr/lib/lua/luci/model/ipkg/init.lua'
no file './luci/model/ipkg.so'
no file '/usr/lib/lua/luci/model/ipkg.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/lib/lua/luci/model/kcptun.lua:49: in function 'get_luci_version'
[string "/usr/lib/lua/luci/view/kcptun/status.htm"]:7: in main chunk
stack traceback:
[C]: in function 'error'
/usr/lib/lua/luci/template.lua:97: in function
(tail call): ?
/usr/lib/lua/luci/cbi.lua:282: in function 'render'
/usr/lib/lua/luci/cbi.lua:266: in function 'render_children'
[string "/usr/lib/lua/luci/view/cbi/map.htm"]:6: in main chunk
stack traceback:
[C]: in function 'error'
/usr/lib/lua/luci/template.lua:97: in function
(tail call): ?
/usr/lib/lua/luci/cbi.lua:257: in function 'render'
/usr/lib/lua/luci/cbi.lua:440: in function 'render'
/usr/lib/lua/luci/dispatcher.lua:1025: in function

解决方法在:https://github.com/kuoruan/luci-app-kcptun/issues/50

安装luci-lib-ipkg,命令如下

opkg install luci-lib-ipkg(如果提示找不到包,就opkg update一下)

问题三:dns通与不通的问题

多次出现5300、5353通不通的问题,最后切换dns服务调试,当然也有可能是仅是chinadns服务的问题,这个后续再定位,现在只是写了个脚本自动重启chinadns。

LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
dig +short dropbox.com @127.0.0.1 -p 5353
if [ "$?" == "0" ]; then
#     echo '['$LOGTIME'] No Problem.'
        exit 0
else
        wget --spider --timeout=3 https://www.baidu.com
        if [ "$?" == "0" ]; then
                echo '['$LOGTIME'] Problem decteted, restarting chinadns.'
                /etc/init.d/chinadns restart
        else
                echo '['$LOGTIME'] Network Problem. Do nothing.'
        fi
fi

 

加个计划任务(每30分钟检测一次dns)

30 * * * * /root/test-kcptun >> /var/log/chinadns.log 2>&1

欢迎交流~~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章