Libjson-c issue with LuCI git-19.170.41626-1154c41-1

root@OpenWrt:/tmp# logread | grep uhtt
Thu Jun 20 15:38:13 2019 daemon.err uhttpd[1095]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:38:18 2019 daemon.err uhttpd[1445]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:38:23 2019 daemon.err uhttpd[1485]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:38:28 2019 daemon.err uhttpd[1486]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:38:33 2019 daemon.err uhttpd[1494]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:40:50 2019 daemon.err uhttpd[1561]: Error loading shared library libjson-c.so.2: No such file or directory (needed by /usr/sbin/uhttpd)
Thu Jun 20 15:40:50 2019 daemon.info procd: Instance uhttpd::instance1 s in a crash loop 6 crashes, 0 seconds since last crash
root@OpenWrt:/tmp# opkg install libjson-c
Package libjson-c4 (0.13.1-1) installed in root is up to date.
root@OpenWrt:/tmp# opkg install luci
Package luci (git-19.170.41626-1154c41-1) installed in root is up to date.

OpenWrt SNAPSHOT, r10273-f528d77
LuCI git-19.170.41626-1154c41-1

1 Like

Notes on the PR indicate that the lead devs are aware of the issue

1 Like

Now I'm getting:

/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>

OpenWrt SNAPSHOT, r10294-3dc4f59eab
LuCI git-19.170.41626-1154c41-1

The /etc/config/luci is the file provided during opkg install.

Make sure that rpcd is running.

root@OpenWrt:/etc/config# /etc/init.d/rpcd start
root@OpenWrt:/etc/config# logread | grep rpcd
root@OpenWrt:/etc/config# logread | grep uhtt
Fri Jun 21 15:16:02 2019 daemon.err uhttpd[1104]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Fri Jun 21 15:16:02 2019 daemon.err uhttpd[1104]: stack traceback:
Fri Jun 21 15:16:02 2019 daemon.err uhttpd[1104]: 	[C]: in function 'assert'
Fri Jun 21 15:16:02 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Fri Jun 21 15:16:02 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>
Fri Jun 21 15:30:10 2019 daemon.err uhttpd[1104]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Fri Jun 21 15:30:10 2019 daemon.err uhttpd[1104]: stack traceback:
Fri Jun 21 15:30:10 2019 daemon.err uhttpd[1104]: 	[C]: in function 'assert'
Fri Jun 21 15:30:10 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Fri Jun 21 15:30:10 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>
pidof rpcd
ubus call session list
ubus call uci get '{ "config": "luci", "section": "main" }'
root@OpenWrt:/etc/config# pidof rpcd
root@OpenWrt:/etc/config# ubus call session list
Command failed: Not found

So I:

opkg update

Then:

root@OpenWrt:/etc/config# opkg install ubus
Package ubus (2018-10-06-221ce7e7-1) installed in root is up to date.
root@OpenWrt:/etc/config# ubus call session list
Command failed: Not found

opkg install --force-reinstall rpcd

root@OpenWrt:/etc/config# opkg install rcpd
Unknown package 'rcpd'.
Collected errors:
 * opkg_install_cmd: Cannot install package rcpd.

:confused:

Well, that'll do it...

Typo. rcpd -> rpcd.

1 Like

lol, my bad (I even double checked!)

root@OpenWrt:/etc/config# opkg install rpcd
Package rpcd (2019-06-05-89bfaa42-2) installed in root is up to date.

Missed —force-reinstall

1 Like

Was lost on why...but why not, apologies:

root@OpenWrt:/etc/config# opkg install rpcd --force-reinstall
Removing package rpcd from root...
Installing rpcd (2019-06-05-89bfaa42-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/powerpc_464fp/base/rpcd_2019-06-05-89bfaa42-2_powerpc_464fp.ipk
Configuring rpcd.

Then:

  • I reload web GUI
  • I run logread | grep uhttpd

More errors:

Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: stack traceback:
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	[C]: in function 'assert'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: stack traceback:
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	[C]: in function 'assert'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Fri Jun 21 15:42:27 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>
Fri Jun 21 15:42:28 2019 daemon.err uhttpd[1104]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Fri Jun 21 15:42:28 2019 daemon.err uhttpd[1104]: stack traceback:
Fri Jun 21 15:42:28 2019 daemon.err uhttpd[1104]: 	[C]: in function 'assert'
Fri Jun 21 15:42:28 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Fri Jun 21 15:42:28 2019 daemon.err uhttpd[1104]: 	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>

The rcpd currently present in the repos is likely broken. Run rpcd without argument as commands and see what happens. It most likely fails to load libjson-c.so.2.

1 Like

@jow, you're correct!

root@OpenWrt:/etc/config# rpcd
Error loading shared library libjson-c.so.2: No such file or directory (needed by /sbin/rpcd)
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci:
 * 	libiwinfo-lua
 * opkg_install_cmd: Cannot install package luci.
root@OpenWrt:~# opkg install libiwinfo-lua luci
Unknown package 'libiwinfo-lua'.
Installing luci (git-19.170.41626-1154c41-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/powerpc_464fp/luci/luci_git-19.170.41626-1154c41-1_all.ipk
Collected errors:
 * opkg_install_cmd: Cannot install package libiwinfo-lua.
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci:
 * 	libiwinfo-lua
 * opkg_install_cmd: Cannot install package luci.

OpenWrt SNAPSHOT, r10294-3dc4f59eab

Now working on:

OpenWrt SNAPSHOT, r10325-b16faf9bc7
LuCI git-19.175.17568-86fd703-1

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