Luci Webinterface not working after every reboot

Hello Folks,

i did a clean/fresh install via usb with
https://api.turris.cz/openwrt-repo/omnia/medkit/omnia-medkit-latest-full.tar.gz

The Router came up with 192.168.1.1 simply set the password with foris. Skipped the rest an did an rebooted

-> Webinterface gone. Not working.

Runing updater.sh via ssh will bring the Webinterface back … until next reboot.

PS:
root@turris:~# ps
PID USER VSZ STAT COMMAND
1 root 1336 S /sbin/procd
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW< [kworker/0:0H]
6 root 0 SW [kworker/u4:0]
7 root 0 SW [rcu_sched]
8 root 0 SW [rcu_bh]
9 root 0 SW [migration/0]
10 root 0 SW [migration/1]
11 root 0 SW [ksoftirqd/1]
12 root 0 SW [kworker/1:0]
13 root 0 SW< [kworker/1:0H]
14 root 0 SW< [netns]
15 root 0 SW [kworker/u4:1]
34 root 0 SW [kworker/u4:2]
37 root 0 SW [kworker/u4:3]
141 root 0 SW< [writeback]
143 root 0 SW< [crypto]
144 root 0 SW [kworker/1:1]
145 root 0 SW< [bioset]
147 root 0 SW< [kblockd]
187 root 0 SW [kswapd0]
188 root 0 SW< [vmstat]
189 root 0 SW [fsnotify_mark]
238 root 0 SW [kworker/0:1]
251 root 0 SW [spi0]
256 root 0 SW< [bioset]
261 root 0 SW< [bioset]
369 root 0 SW [irq/94-8-0071]
375 root 0 SW [irq/45-mmc0]
396 root 0 SW< [ipv6_addrconf]
401 root 0 SW< [bioset]
403 root 0 SW< [deferwq]
408 root 0 SW< [bioset]
409 root 0 SW [mmcqd/0]
410 root 0 SW< [bioset]
411 root 0 SW [mmcqd/0boot0]
412 root 0 SW< [bioset]
413 root 0 SW [mmcqd/0boot1]
414 root 0 SW< [bioset]
415 root 0 SW [mmcqd/0rpmb]
426 root 0 SW< [btrfs-worker]
427 root 0 SW< [kworker/u5:0]
428 root 0 SW< [btrfs-worker-hi]
429 root 0 SW< [btrfs-delalloc]
430 root 0 SW< [btrfs-flush_del]
431 root 0 SW< [btrfs-cache]
432 root 0 SW< [btrfs-submit]
433 root 0 SW< [btrfs-fixup]
434 root 0 SW< [btrfs-endio]
435 root 0 SW< [btrfs-endio-met]
436 root 0 SW< [btrfs-endio-met]
437 root 0 SW< [btrfs-endio-rai]
438 root 0 SW< [btrfs-endio-rep]
439 root 0 SW< [btrfs-rmw]
440 root 0 SW< [btrfs-endio-wri]
441 root 0 SW< [btrfs-freespace]
442 root 0 SW< [btrfs-delayed-m]
443 root 0 SW< [btrfs-readahead]
444 root 0 SW< [btrfs-qgroup-re]
445 root 0 SW< [btrfs-extent-re]
446 root 0 SW [btrfs-cleaner]
447 root 0 SW [btrfs-transacti]
448 root 0 SW< [kworker/0:1H]
450 root 0 SW< [kworker/1:1H]
468 root 0 SW [jfsIO]
469 root 0 SW [jfsCommit]
470 root 0 SW [jfsCommit]
471 root 0 SW [jfsSync]
473 root 0 SW< [xfsalloc]
475 root 0 SW< [xfs_mru_cache]
481 root 0 SW< [ata_sff]
508 root 0 SW [scsi_eh_0]
509 root 0 SW< [scsi_tmf_0]
512 root 0 SW [scsi_eh_1]
513 root 0 SW< [scsi_tmf_1]
539 root 0 SW [kworker/0:2]
559 root 0 SW< [kworker/u5:1]
560 root 0 SW< [kworker/u5:2]
781 root 808 S /sbin/ubusd
830 root 688 S /sbin/askfirst /bin/ash --login
866 root 0 SW [irq/41-f1090000]
867 root 0 SW [irq/42-f1090000]
943 root 0 SW< [md]
954 root 0 SW< [raid5wq]
970 root 0 SW< [kafs_vlupdated]
971 root 0 SW< [kafs_callbackd]
972 root 0 SW< [kafsd]
976 root 0 SW< [cifsiod]
985 root 0 SW< [rpciod]
1061 root 0 SW< [nfsiod]
1102 root 0 SW< [cfg80211]
1111 root 0 SW< [ath10k_wq]
1112 root 0 SW< [ath10k_aux_wq]
1150 root 0 SW< [cryptodev_queue]
1480 root 1872 S /sbin/rpcd
1514 root 0 SW [kworker/1:2]
1544 root 6360 S {sfpswitch.py} /usr/bin/python /usr/sbin/sfpswitch.py --nodaemon
1565 root 1448 S /sbin/netifd
1695 root 1100 S /usr/sbin/odhcpd
1738 nobody 764 S /usr/sbin/atd -f
1755 root 688 S nethist
1779 root 2800 S /usr/sbin/sshd -f /var/etc/ssh/sshd_config
1816 root 4304 S {syslog-ng} supervising syslog-ng
1817 root 4488 S /usr/sbin/syslog-ng
1949 root 32480 S /usr/bin/kresd -c /tmp/kresd.config -f 1 /tmp/kresd -a 0.0.0.0 53 -a :: 53 -k /etc/r
1961 root 1124 S {S80lighttpd} /bin/sh /etc/rc.common /etc/rc.d/S80lighttpd boot
1963 root 2820 S /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
2001 nobody 876 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k -x /var/run/dnsmasq/dnsmasq.pid
2047 root 1112 S {hotplug-call} /bin/sh /sbin/hotplug-call iface
2098 root 1128 S {hotplug-call} /bin/sh /sbin/hotplug-call iface
2110 root 5388 S sshd: root@pts/0
2121 root 1080 S -ash
2126 root 696 S /usr/sbin/ntpclient -c 1 -p 123 -i 2 -h 3.openwrt.pool.ntp.org
2127 root 1076 R ps
root@turris:~#

root@turris:~# uci show >/dev/null
root@turris:~#

So i need help :wink: Or fixed image :wink:

thanks a lot
Alex

Based on the processes it seems that the boot sequence has not finished. There are some processes that I think should not be there (1961, 2047, 2098) and some missing processes like nuci. If there is no nuci then the luci web interface cannot work.

Hmmm its a fresh clean install, so what can i do?!

It is difficult to say. It seems that the boot sequence has hung for some reason. The solution is to find what is causing it to hung.

You could try to check that TCP/IP stack is working properly. For example check that these work:

ping 127.0.0.1
ping localhost

Then you could check “ip addr show” and “ip route show”. For example there should not be the same subnet in multiple interfaces.

You could also try “pstree” to see the process chains if it reveals anything new.

And you can try “netstat -alp” to see how processes are using the network.

And if you run this command “sh /usr/share/foris/lighttpd-dynamic-conf” does it produce a configuration or does it hung?

I have the same problem with factory default - only interface 192.168.1.1 or with changed to 192.168.0.2

root@turris:~# ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.106 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.071 ms
64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.091 ms
^C
— localhost ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.071/0.089/0.106 ms
root@turris:~# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.107 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.069 ms
^C
— 127.0.0.1 ping statistics —
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.069/0.088/0.107 ms
root@turris:~#

root@turris:~# pstree
procd-±S80lighttpd—lighttpd
|-askfirst
|-atd
|-dnsmasq
|-kresd
|-nethist
|-netifd
|-ntpclient
|-odhcpd
|-rpcd
|-sfpswitch.py
|-sshd—sshd—ash—pstree
|-syslog-ng—syslog-ng
`-ubusd

root@turris:~# netstat -alp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:domain 0.0.0.0:* LISTEN 1948/kresd
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 1861/sshd
tcp 0 196 192.168.0.2:ssh 192.168.0.102:64470 ESTABLISHED 2118/0
tcp 0 0 :::domain :::* LISTEN 1948/kresd
tcp 0 0 :::ssh :::* LISTEN 1861/sshd
udp 0 0 0.0.0.0:domain 0.0.0.0:* 1948/kresd
udp 0 0 192.168.0.2:ntp 37.120.191.49:ntp ESTABLISHED 2267/ntpclient
udp 0 0 0.0.0.0:7001 0.0.0.0:* -
udp 0 0 0.0.0.0:7001 0.0.0.0:* -
udp 0 0 :::domain :::* 1948/kresd
udp 0 0 :::41835 :::* -
udp 0 0 :::dhcpv6-server :::* 1709/odhcpd
raw 0 0 :::58 ::%3069663512:* 58 1709/odhcpd
raw 0 0 :::58 ::%3069663512:* 58 1709/odhcpd
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 1812 1948/kresd tty/1948
unix 4 [ ] DGRAM 2108 1872/syslog-ng /dev/log
unix 2 [ ACC ] STREAM LISTENING 2111 1872/syslog-ng /var/syslog-ng.ctl
unix 2 [ ACC ] STREAM LISTENING 1130 779/ubusd /var/run/ubus.sock
unix 2 [ ] DGRAM 2023 1999/dnsmasq
unix 2 [ ] DGRAM 1423 1563/netifd
unix 3 [ ] STREAM CONNECTED 774 779/ubusd /var/run/ubus.sock
unix 2 [ ] DGRAM 1487 1563/netifd
unix 3 [ ] STREAM CONNECTED 1321 779/ubusd /var/run/ubus.sock
unix 3 [ ] STREAM CONNECTED 1320 1563/netifd
unix 3 [ ] STREAM CONNECTED 1283 779/ubusd /var/run/ubus.sock
unix 3 [ ] STREAM CONNECTED 679 1478/rpcd
unix 3 [ ] STREAM CONNECTED 1144 779/ubusd /var/run/ubus.sock
unix 3 [ ] STREAM CONNECTED 488 1/procd
unix 3 [ ] STREAM CONNECTED 1413 1709/odhcpd
root@turris:~#

root@turris:~# sh /usr/share/foris/lighttpd-dynamic-conf

var.foris.bin = "/usr/bin/foris"
var.foris.flags = "-s flup"
var.foris.scriptname = “/”

$HTTP[“url”] =~ “^” + var.foris.scriptname + “(?(?<!/)/|)(?!static|cgi-bin|luci-static|plugins)” {
fastcgi.debug = 0
fastcgi.server = (
var.foris.scriptname => (
“python-fcgi” => (
“socket” => “/tmp/fastcgi.python.socket”,
“bin-path” => var.foris.bin + " " + var.foris.flags,
“fix-root-scriptname” => “enable”, # required for extension “/”
“check-local” => “disable”,
“max-procs” => 1,
)
)
)
}

alias.url += ( “/” + “static/” => “/usr/lib/python2.7/site-packages/foris/static/” )

alias.url += ( “/” + “plugins/diagnostics/static/” => “/usr/share/foris/plugins/diagnostics/static/” )
root@turris:~#

I killed the S80lighttpd process, and the box started lighttpd correctly after flashing LEDs.

The issue I have was that I tried to boot the box without any WAN connection. That seems to (I guess) make lighttpd hang in a way that is not very good. As killing the s80 process solved the problem, maybe the order between starting processes is wrong?

I don´t have a wan connection too.

I flashed the 2017-01-06 nightly from https://api.turris.cz/openwrt-repo/omnia-nightly/medkit/

and now! its working! Looks like an bug in the latest stable release.

So i´m thinking about turning off auto updates… (-:

Confirmed bug. Will be solved in next 3.5 stable