最近趁公司網絡調整,把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
歡迎交流~~