I'm from Brescia (ITALY), I am a “old Computer Hardware Technician” and now a System Engineer.
This is the question:
After a regular URL update performed via LAN from version 18.06.7 to 18.06.8 (openwrt-18.06.8-ar71xx-tiny-tl-wa801nd-v2-squashfs-sysupgrade), the AP TL-WA801N performs a standard reboot.
Now the AP is updated to the latest version and is functional but the LUCI Webgui interface crashes with the following message:
**/usr/lib/lua/luci/dispatcher.lua:234: /etc/config/luci seems to be corrupt, unable to find section 'main'**
**stack traceback:**
** [C]: in function 'assert'**
** /usr/lib/lua/luci/dispatcher.lua:234: in function 'dispatch'**
** /usr/lib/lua/luci/dispatcher.lua:127: in function </usr/lib/lua/luci/dispatcher.lua:126>**
No additional packages have been install, standard configuration.
Informing you that I can enter via SSH, what can I do to restore the LUCI interface?
Thank you
Carlo Gazz
Confirming this LuCi bug on a TP-Link TL-WR741N/ND v4 after upgrading by preserving the configuration from OpenWRT 18.06.7 to 18.06.8, my error is:
/usr/lib/lua/luci/dispatcher.lua:234: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:234: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:127: in function </usr/lib/lua/luci/dispatcher.lua:126>
I tried both workarounds without any positive results:
1.
mv -f /etc/config/luci /etc/config/luci.bak
cp -f /rom/etc/config/luci /etc/config/luci
I am still unable to reproduce the issue here on three different devices. Apparently something in the backed up configurations is causing it. Maybe someone can share his failing config backups with me so that I can take a look.
I could. but I'll need to trim out all my passwords and "private" info and I don't have time right now, - really busy @work, maybe in the evening.
Meanwhile, I'm just having a standard "Routed AP" config that lasted the upgrades from 18.06.1 to 18.06.7, doing PPPoE and having a few pages of custom firewall rules ... if that helps.
and then rebooting the router will actually fix it.
Tried it before, but instead of just blindly rebooting, I played with:
/etc/init.d/uhttpd restart
luci-reload
@carlun58
I'm always creating a config backup (LuCi - tar.gz archive) before I upgrade OpenWRT.
In this case, I "downgraded" to 18.06.7 by simply flashing the router with the factory 18.06.7 and then restoring the config backup.
Restoring a config backup between different (major) OpenWrt versions is not a good idea. While keeping configs over an upgrade is (sometimes, not always) handled by upgrade scripts (usually not for downgrades) to account for important configuration changes (e.g. as dnsmasq requires between 19.07.x and current master, to account for the changed resolv.conf locations), restoring a configuration tarball made with a different OpenWrt version bypasses these upgrade scripts (and/ or sanity checks), which may (will, in case of the aforementioned dnsmasq changes) soft-brick your device.
root@WR741ND:~# config rpcd
-ash: config: not found
root@WR741ND:~# config rpcd
-ash: config: not found
root@WR741ND:~# option socket /var/run/ubus.sock
-ash: option: not found
root@WR741ND:~# option timeout 30
-ash: option: not found
root@WR741ND:~# cd /etc/config/rpcd
-ash: cd: can't cd to /etc/config/rpcd: Not a directory
I've used vi - after changes and :wq I get rpcd is read only.
Strange but although the configuration was not written I can now login successfully to Luci via Web interface. Still seems there is something wrong because now I cannot remove packages from the software section.
Likely your /overlay is mounted read-only, either because it is too full, or because there is something wrong.
Just grep your system log for items relate to "jffs2" or "overlay" and see, which errors are logger. Likely something like "jffs2 mounted read-only". Also "df -h" and "mount" can provide clues.