question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/usr/lib/lua/luci/dispatcher.lua:370: /etc/config/luci seems to be corrupt, unable to find section 'main'

See original GitHub issue

Update to latest master and restore config from backup (~6 month old), got error: /usr/lib/lua/luci/dispatcher.lua:370: /etc/config/luci seems to be corrupt, unable to find section 'main'

#2885, #2799, #2231 - this is not first time.

Workaroud in this message: https://github.com/openwrt/luci/issues/2231#issuecomment-663915276 work for me: if I run rpcd from ssh then error gone.

I dig inside and found that in my backup /etc/config/rpcd

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

config login
	option username 'root'
	option password '$p$root'
	list read '*'
	list write '*'

This is from default config after reset:

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

config login
	option username 'root'
	option password '$p$root'
	list read '*'
	list write '*'

As you can see:

  1. option socket is different.
  2. if rpcd started without options - if uses proper path to socket, at least GUI works.

Why not remove option socket handling from /etc/config/rpcd and /etc/init.d/rpcd ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
SmallAndSoftcommented, Oct 8, 2021

I have been watching real time graphs in luci and top over ssh. CPU eating luci subprocess quit and now I have this error. Restarting rpcd helped.

5reactions
Cadaircommented, Nov 27, 2021

I too got this after using the real time graphs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

etc/config/luci seems to be corrupt, unable to find section 'main'
OpenWrt 18.06.1 on a WRT3200ACM Sometimes, when I try to access the main page on the router, I get this error: ...
Read more >
How I fixed OpenWRT LuCI error /etc/config/luci seems to be ...
How I fixed OpenWRT LuCI error /etc/config/luci seems to be corrupt, unable to find section 'main'. Problem: When you try to open your...
Read more >
Recent upgrade broke Luci - Installing and Using OpenWrt
/usr/lib/lua/luci/dispatcher.lua:234: /etc/config/luci seems to be corrupt, unable to find section 'main' stack traceback…
Read more >
/usr/lib/lua/luci/dispatcher.lua:370: /etc/config/luci seems to be ...
usr/lib/lua/luci/dispatcher.lua:370: /etc/config/luci seems to be corrupt, unable to find section 'main'
Read more >
Luci seems to be corrupt - Technical Support - GL.iNet Forum
/usr/lib/lua/luci/dispatcher.lua:230: /etc/config/luci seems to be corrupt, unable to find section 'main' stack traceback:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found