Openwrt

系統升級到 18.06.1 後 luci-app-sqm “404 Not Found”

  • August 21, 2018

我使用“sysupgrade”從 lede-17.01.4 升級到 Openwrt 18.06.1。現在我無法在 LUCI Web 界面中打開 SQM 頁面。為什麼?

我使用 Web 界面備份並恢復了我的 openwrt 配置,然後luci-app-sqm再次安裝。

相比之下,UPNP 頁面(來自額外的包luci-app-upnp)似乎沒有任何問題地顯示。

我的第一個問題是 Web 界面 ( https://openwrt/cgi-bin/luci/admin/network/sqm) 中的 SQM 頁面顯示

404 未找到

抱歉,找不到您請求的對象。無法調度:/cgi-bin/luci/admin/network/sqm

另外,我嘗試刪除 LUCI 記憶體 ( rm -r /tmp/luci-indexcache /tmp/luci-modulecache)。我認為這通常是顯示新菜單項所必需的。這次它從菜單中消失了 SQM 項目:(。

我也試過rm /etc/config/sqm,然後刪除並重新安裝sqm。這沒有任何幫助,但它顯示了一些錯誤。也許它們是相關的。

# opkg remove luci-app-sqm sqm
Removing package luci-app-sqm from root...
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23
uci: Entry not found

# opkg install luci-app-sqm
Installing luci-app-sqm (1.2.3-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mips_24kc/packages/luci-app-sqm_1.2.3-1_all.ipk
Configuring luci-app-sqm.
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23
uci: Entry not found
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23
uci: Entry not found

我在logread.


我的硬體是 Netgear WNDR3800。

SQM 文件中仍然存在陳舊狀態。請注意,您的刪除命令並未刪除sqm包。

正確的名字是sqm-scripts。然後問題得到解決,在以下之後:

# opkg remove luci-app-sqm sqm-scripts
Removing package luci-app-sqm from root...
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23
uci: Entry not found
Removing package sqm-scripts from root...
/usr/lib/sqm/run.sh: .: line 12: can't open '/etc/sqm/sqm.conf': No such file or directory
Not deleting modified conffile /etc/sqm/sqm.conf.
Not deleting modified conffile /etc/config/sqm.
Collected errors:
* file_sha256sum_alloc: Failed to open file /etc/sqm/sqm.conf: No such file or directory.
* file_sha256sum_alloc: Failed to open file /etc/config/sqm: No such file or directory.

# opkg install luci-app-sqm
Installing luci-app-sqm (1.2.3-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mips_24kc/packages/luci-app-sqm_1.2.3-1_all.ipk
Installing sqm-scripts (1.2.3-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mips_24kc/packages/sqm-scripts_1.2.3-1_all.ipk
Configuring sqm-scripts.
Configuring luci-app-sqm.
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23
uci: Parse error (section of different type overwrites prior section with same name) at line 12, byte 23

我認為陳舊的狀態是/etc/sqm/sqm.conf.


您可以檢查系統中與預設值不同的包配置文件,如下所示:

# opkg list-changed-conffiles
/etc/group
/etc/hosts
/etc/passwd
/etc/profile
/etc/services
/etc/shadow
/etc/sysctl.conf
/etc/config/ddns
/etc/config/dhcp
/etc/dropbear/dropbear_rsa_host_key
/etc/config/firewall
/etc/config/luci
/etc/config/ucitrack
/etc/config/upnpd
/etc/opkg/customfeeds.conf
/etc/config/snmpd
/etc/config/sqm
/etc/sqm/sqm.conf
/etc/config/uhttpd
Collected errors:
* file_sha256sum_alloc: Failed to open file /etc/config/sqm: No such file or directory.
* file_sha256sum_alloc: Failed to open file /etc/sqm/sqm.conf: No such file or directory.

其中一些名字可能被認為是令人震驚的。ala “使用者/組、網路、交換機等配置中的某些主要設置可能已更改,因此 15.05(或 17.01)的舊設置在 17.01 或 18.06 或更高版本中將無法正常使用。在主要版本升級後從新的預設配置開始,手動從頭開始創建關鍵配置文件可能會更好,這樣目前的預設設置就形成了起始基礎。”

引用自:https://unix.stackexchange.com/questions/463824