LUCI WebGui crash after updating to Ver.18.6.8 on TP-LINK TL-WA801N v2

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

1 Like

@carlun58, welcome to the community!

1 Like

Add following lines to /etc/config/rpcd

config rpcd
option socket /var/run/ubus.sock
option timeout 30

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

  1. adding to /etc/config/rpcd
    config rpcd
    option socket /var/run/ubus.sock
    option timeout 30

Downgraded back to the vulnerable 18.06.7 (vulnerable pppd - which I actually use for the PPPoE connection), at least it works fine.

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.

Hi justme123,
I have the same issue with TP-LINK TL-WA801Nv2; how can I downgrade to previous my version (18.06.7) by SSH CLI?
Thanks
Carlo

@jow

I got it fixed, finally. Adding in the beginning of /etc/config/rpcd

config rpcd
	option socket /var/run/ubus.sock
	option timeout 30

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.

cd /tmp
wget http://downloads.openwrt.org/releases/18.06.7/targets/ar71xx/tiny/openwrt-18.06.7-ar71xx-tiny-tl-wr741nd-v4-squashfs-factory.bin
mtd -r write /tmp/openwrt-18.06.7-ar71xx-tiny-tl-wr741nd-v4-squashfs-factory.bin firmware
  • rebooted and restored the config

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.

1 Like

Thank you,
I did what you said and I solved it; now LuCI of 18.06.8 of my AP TP-LINK TL-WA801Nv2 works perfectly.

<<Adding in the beginning of /etc/config/rpcd

config rpcd
	option socket /var/run/ubus.sock
	option timeout 30

and then rebooting. >>

2 Likes

For me config rpcd just throws not found

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
1 Like

Those are not commands, but contents of the config file, like carlun58 writes

How can I add that to rpcd.

You log into the shell and use a text editor like nano or vi.

Just like you always edit config files or other file manually in the shell...

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.

logread | grep jffs2
logread | grep overlay
df -h
mount

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.