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.

Internal server error (unable to find section 'main')

See original GitHub issue

Hi Guys,

I think I have the same situation as in issue #1803 . D-Link DWR-118 A2 fresh snapshot install tried hard reset etc etc.

/usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section ‘main’ stack traceback: [C]: in function ‘assert’ /usr/lib/lua/luci/dispatcher.lua:247: in function ‘dispatch’ /usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>

ls -la /etc/config/luci

-rw-------    1 root     root           793 Jun 21 14:38 /etc/config/luci

grep “main” /etc/config/luci

config core 'main'

opkg list-installed luci*

luci - git-19.170.41626-1154c41-1
luci-app-firewall - git-19.170.41626-1154c41-1
luci-app-opkg - git-19.170.41626-1154c41-1
luci-base - f138fc93-1
luci-lib-ip - git-19.170.41626-1154c41-1
luci-lib-jsonc - git-19.170.41626-1154c41-1
luci-lib-nixio - git-19.170.41626-1154c41-1
luci-mod-admin-full - git-19.170.41626-1154c41-1
luci-mod-network - git-19.170.41626-1154c41-1
luci-mod-status - git-19.170.41626-1154c41-1
luci-mod-system - git-19.170.41626-1154c41-1
luci-proto-ipv6 - git-19.170.41626-1154c41-1
luci-proto-ppp - git-19.170.41626-1154c41-1
luci-theme-bootstrap - git-19.170.32094-4d6d8bc-1

ls -l /usr/share/rpcd/acl.d/

-rw-r--r--    1 root     root           159 Jun 20 13:48 luci-base.json
-rw-r--r--    1 root     root           179 Jun  7 16:22 unauthenticated.json

ls -l /usr/share/acl.d/

-rw-r--r--    1 root     root            50 Jun 21 10:03 dnsmasq_acl.json
-rw-r--r--    1 root     root            91 Jun 20 13:48 luci-base.json

luci config file

config core 'main'
        option lang 'auto'
        option mediaurlbase '/luci-static/bootstrap'
        option resourcebase '/luci-static/resources'

config extern 'flash_keep'
        option uci '/etc/config/'
        option dropbear '/etc/dropbear/'
        option openvpn '/etc/openvpn/'
        option passwd '/etc/passwd'
        option opkg '/etc/opkg.conf'
        option firewall '/etc/firewall.user'
        option uploads '/lib/uci/upload/'

config internal 'languages'

config internal 'sauth'
        option sessionpath '/tmp/luci-sessions'
        option sessiontime '3600'

config internal 'ccache'
        option enable '1'

config internal 'themes'

config internal 'apply'
        option rollback '30'
        option holdoff '4'
        option timeout '5'
        option display '1.5'

config internal 'diag'
        option dns 'openwrt.org'
        option ping 'openwrt.org'
        option route 'openwrt.org'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Tomlincolncommented, Jun 22, 2019

Anybody who reads this, the solution is the following: Link the new library file to the old name in /usr/lib:

root@OpenWrt:~# cd /usr/lib
root@OpenWrt:/usr/lib# ln -s libjson-c.so.4.0.0 libjson-c.so.2

Then it works as it should, and LuCi works too! 😃

root@OpenWrt:~# service rpcd start
root@OpenWrt:~# ps | grep rpcd
 5045 root      1548 S    /sbin/rpcd -s /var/run/ubus.sock -t 30
0reactions
seandexcommented, Oct 15, 2019

@odon-noda confirmed. it is rpcd problem. cd /tmp wget http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/rpcd_2019-09-01-821045f6-3_mips_24kc.ipk opkg install rpcd_2019-09-01-821045f6-3_mips_24kc.ipk --force-downgrade worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP 500 Internal Server Error: What It Means & How to Fix It
This code tells users that the server is temporarily unable to load the page they're looking for. Check out this post for a...
Read more >
How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request. See these ......
Read more >
What is a 500 Internal Server Error? - Allconnect.com
A 500 Internal Server Error is an umbrella term for several issues often involving the server of the website you're trying to reach....
Read more >
What Is a "500 Internal Server Error" and How Do I Fix It?
Why am I getting a 500 Internal Server Error message? They indicate that the server failed to complete the request because server encountered...
Read more >
How to Fix the 500 Internal Server Error in WordPress
Before you move on with other things, make sure that you go to Settings » Permalinks page in WordPress admin area and click...
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