Luci inaccessible

Hi I’ve reflshed router (Omnia) with HBK and switched-branch to HBK and runned pkgupdate and rebooted and I do get error with luci. What might be wrong?

/usr/lib/lua/luci/dispatcher.lua:315: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:315: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:208: in function </usr/lib/lua/luci/dispatcher.lua:207>

/etc/config/luci is fine

I’ve went back to factory and configure everything again. Seems to work fine now. Not closing yet!

And still no answer provided.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Having the exact same issue, not sure what is causing it.

root@gw:~# lighttpd -D -f /etc/lighttpd/lighttpd.conf


/usr/lib/lua/luci/dispatcher.lua:315: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:315: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:208: in function </usr/lib/lua/luci/dispatcher.lua:207>
/usr/lib/lua/luci/dispatcher.lua:315: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:315: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:208: in function </usr/lib/lua/luci/dispatcher.lua:207>
/usr/lib/lua/luci/dispatcher.lua:315: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:315: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:208: in function </usr/lib/lua/luci/dispatcher.lua:207>
^Croot@gw:~# cat /etc/config/luci 

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'
	option cs 'Čeština (Czech)'
	option de 'Deutsch (German)'
	option en 'English'

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

config internal 'ccache'
	option enable '1'

config internal 'themes'
	option Bootstrap '/luci-static/bootstrap'

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

config internal 'diag'
	option dns 'www.turris.cz'
	option ping 'www.turris.cz'
	option route 'www.turris.cz'

Should be pretty stock except for I have Let’s Encrypt cron to get a wildcard certificate for this and few other home devices, so this lighthttpd config is replaced:

$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/ssl/private/certs/*.exampledomain.com/exampledomain.pem"
}

However the landing page works, so it’s something else.

what is the output from ls -afdhl /usr/bin/python ?

File not found. :open_mouth:
ln -s /usr/bin/python3.7 /usr/bin/python
didn’t help either.
That seems to be the only python version I have installed. Is python2 needed?

There are other user reports that python-base gets removed during an update in certain HB*-branches.


Did you reboot the node? Try

ln -sfn /usr/bin/python3 /usr/bin/python ; reboot

2 Likes

Amazing, the symlink creation and the bluescreenOS workaround solved it.
Thanks.

According to the developer the issue https://gitlab.labs.nic.cz/turris/turris-build/issues/142 is non-existent and the workaround (symlink) neither necessary or correct - therefore a :warning: for deploying the workaround.

I didn’t say anything about non-existent issue. That’s the power of deleting comments, right? It seems like I have monolog, which is not true. Anyway, more details were requested, which you didn’t provide and you came with workaround which is not right.

Not true, see issue tracker

[python2] removal renders LuCI inaccessible due to missing binary path

that in HBD|L|K during an upgrade certain python2 modules (python-base | python-light | python-logging | python-multiprocessing) being removed and rendering LuCI inaccessible.

Provides the cause for LuCI being inaccessible.

Also furnished debug logs from pkgupdate about the removal of those packages, which you choose to ignore and that cannot be helped then (therefore been removed).


Not according to your statement in the issue tracker:

LuCI works without your suggested workaround


The workaround fixes the issue on my node and at least another user’s. If its incorrect than why not come up with something correct?

Reading

It would explain the removal of the python2 packages in certain HB*-branches. But it does not explain why some user in those particular branches experience the issue but it is not reproducible for the developer.

This is what I got after factory reset to TOS4, in TOS5 I was not able to login to Luci also:

TurrisOS 4.0.5, Turris Omnia

root@turris:~# pkgupdate
INFO:Target Turris OS: 4.0.5
WARN:Package wpad is in cyclic dependency. It might fail its post-install script .
WARN:Package hostapd is in cyclic dependency. It might fail its post-install scr ipt.
WARN:Requested package pkglists-l10n-cs that is missing, ignoring as requested.
WARN:Requested package pkglists-l10n-de that is missing, ignoring as requested.
WARN:Requested package foris-storage-plugin-l10n-de that is missing, ignoring as requested.
WARN:Requested package luci-i18n-adblock-en that is missing, ignoring as request ed.
WARN:Requested package luci-i18n-adblock-cs that is missing, ignoring as request ed.
WARN:Requested package luci-i18n-adblock-de that is missing, ignoring as request ed.
WARN:Requested package luci-i18n-bcp38-en that is missing, ignoring as requested .
WARN:Requested package luci-i18n-bcp38-cs that is missing, ignoring as requested .
WARN:Requested package luci-i18n-bcp38-de that is missing, ignoring as requested .
WARN:Requested package luci-i18n-mjpg-streamer-en that is missing, ignoring as r equested.
WARN:Requested package luci-i18n-mjpg-streamer-cs that is missing, ignoring as r equested.
WARN:Requested package luci-i18n-mjpg-streamer-de that is missing, ignoring as r equested.
WARN:Requested package luci-i18n-sqm-en that is missing, ignoring as requested.
WARN:Requested package luci-i18n-sqm-cs that is missing, ignoring as requested.
WARN:Requested package luci-i18n-sqm-de that is missing, ignoring as requested.
WARN:Requested package luci-i18n-rainbow-en that is missing, ignoring as request ed.
WARN:Requested package luci-i18n-rainbow-cs that is missing, ignoring as request ed.
WARN:Requested package luci-i18n-rainbow-de that is missing, ignoring as request ed.
WARN:Requested package foris-pakon-plugin-l10n-de that is missing, ignoring as r equested.
WARN:Requested package luci-i18n-lxc-en that is missing, ignoring as requested.
WARN:Requested package luci-i18n-lxc-cs that is missing, ignoring as requested.
WARN:Requested package luci-i18n-lxc-de that is missing, ignoring as requested.

Any more thoughts on that subject?

Symlinking python3 to python breaks my omnia. Cannot get IP. Have to rollback after that change.

That cannot be the cause since nothing py related is involved in obtaining or providing an IP address.

I applied the workaround and restarted rpcd. So far so good, haven’t rebooted yet though.
Foris is still not loading, reForis works though. I’m on the HBT branch

Foris:
login page not loaded,
no output to be shared
Chrome DevTools are showing config/ (pending)
nothing in /var/log/messages and in /var/log/lighttpd/errors.log

Luci:
no login page showed, but:
/cgi-bin/luci shows /usr/lib/lua/luci/dispatcher.lua:426: /etc/config/luci seems to be corrupt, unable to find section ‘main’
/etc/config/luci not modified

1 Like
Update notifications

Your approval is required to apply pending updates.You can grant it in the Foris administrative interface in the ‘Updater’ menu.
• Install libgcc 7.5.0-2.1
• Install libc 1.1.24-2.1
• Install kernel 4.14.179-1-407155383ebf1bbcc8763e96d7a9eae3.0

• Install foris-netmetr-plugin 4.6-3.7-3.17
• Remove python-logging
• Remove python-multiprocessing
• Remove python-light
• Remove python-base

reboot is a vital part of the workaround.