[Solved] LuCI won't start, unable to find logs or other clues

Hi!

I've just upraded from OpenWrt to 15.05 to LEDE 17.01.4 on a TL-WR1043ND (version 2.1).

Everything seems to work, except the web interface. I love the command line, but I also really, really like LuCI. :slight_smile:

I followed these instructions: https://medium.com/openwrt-iot/openwrt-adding-a-web-interface-4bcdf1279a6

So, while I'm experienced enough on major Linux platforms, I'm rather confused as to where to look for clues when something goes wrong in OpenWrt/LEDE. I wanted to check the logs, but there seem to be only two, empty logs, /tmp/log/lastlog and /tmp/log/wtmp. I must admit that I'm not used to "space travel" systems that need to conserve resource usage as much as possible. :wink:

All of these commands just run without any messages (which normally means there's no problem):

root@gateway:/tmp/log# /etc/init.d/uhttpd restart
root@gateway:/tmp/log# /etc/init.d/uhttpd enable
root@gateway:/tmp/log# luci-reload

My only knowledge about what's broken, is that neither port 80 nor 443 are opened on the box, at least not from my local network. Telnet isn't installed and it doesn't seem to be available

So on one hand it's a problem with getting LuCI up, but on the other hand it's a general problem I have with figuring out how to investigate such problems.

Any help with either would be very much appreciated.


Some output

Here are the packages I have installed:

root@gateway:~# opkg list-installed
base-files - 173.1-r3560-79f57e422d
busybox - 1.25.1-4
dnsmasq - 2.78-6
dropbear - 2017.75-4
firewall - 2017-05-27-a4d98aea-1
fstools - 2017-06-30-bdcb075f-1
fwtool - 1
hostapd-common - 2016-12-19-ad02e79d-7
ip6tables - 1.4.21-3
iptables - 1.4.21-3
iw - 4.9-1
iwinfo - 2016-09-21-fd9e17be-1
jshn - 2018-01-07-1dafcd78-1
jsonfilter - 2016-07-02-dea067ad-1
kernel - 4.4.92-1-45d282495a15974d60f8edb091d0e2a9
kmod-ath - 4.4.92+2017-01-31-3
kmod-ath9k - 4.4.92+2017-01-31-3
kmod-ath9k-common - 4.4.92+2017-01-31-3
kmod-cfg80211 - 4.4.92+2017-01-31-3
kmod-gpio-button-hotplug - 4.4.92-2
kmod-ip6tables - 4.4.92-1
kmod-ipt-conntrack - 4.4.92-1
kmod-ipt-core - 4.4.92-1
kmod-ipt-nat - 4.4.92-1
kmod-lib-crc-ccitt - 4.4.92-1
kmod-mac80211 - 4.4.92+2017-01-31-3
kmod-nf-conntrack - 4.4.92-1
kmod-nf-conntrack6 - 4.4.92-1
kmod-nf-ipt - 4.4.92-1
kmod-nf-ipt6 - 4.4.92-1
kmod-nf-nat - 4.4.92-1
kmod-nls-base - 4.4.92-1
kmod-ppp - 4.4.92-1
kmod-pppoe - 4.4.92-1
kmod-pppox - 4.4.92-1
kmod-slhc - 4.4.92-1
kmod-usb-core - 4.4.92-1
kmod-usb-ledtrig-usbport - 4.4.92-1
kmod-usb2 - 4.4.92-1
lede-keyring - 2017-01-20-a50b7529-1
libblobmsg-json - 2018-01-07-1dafcd78-1
libc - 1.1.16-1
libgcc - 5.4.0-1
libip4tc - 1.4.21-3
libip6tc - 1.4.21-3
libiwinfo - 2016-09-21-fd9e17be-1
libiwinfo-lua - 2016-09-21-fd9e17be-1
libjson-c - 0.12.1-1
libjson-script - 2018-01-07-1dafcd78-1
liblua - 5.1.5-1
libnl-tiny - 0.1-5
libpthread - 1.1.16-1
libubox - 2018-01-07-1dafcd78-1
libubus - 2017-02-18-34c6e818-1
libubus-lua - 2017-02-18-34c6e818-1
libuci - 2018-01-01-141b64ef-1
libuci-lua - 2018-01-01-141b64ef-1
libuclient - 2017-11-02-4b87d831-1
libxtables - 1.4.21-3
logd - 2017-03-10-16f7e161-1
lua - 5.1.5-1
luci - git-18.147.69097-36945b5-1
luci-app-firewall - git-18.147.69097-36945b5-1
luci-base - git-18.147.69097-36945b5-1
luci-lib-ip - git-18.147.69097-36945b5-1
luci-lib-jsonc - git-18.147.69097-36945b5-1
luci-lib-nixio - git-18.147.69097-36945b5-1
luci-mod-admin-full - git-18.147.69097-36945b5-1
luci-proto-ipv6 - git-18.147.69097-36945b5-1
luci-proto-ppp - git-18.147.69097-36945b5-1
luci-theme-bootstrap - git-18.147.69097-36945b5-1
mtd - 21
netifd - 2017-01-25-650758b1-1
odhcp6c - 2017-01-30-c13b6a05-2
odhcpd - 2018-05-27-59339a76-4
opkg - 2017-03-23-1d0263bb-1
ppp - 2.4.7-12
ppp-mod-pppoe - 2.4.7-12
procd - 2017-08-08-66be6a23-1
rpcd - 2018-05-13-82062195-1
swconfig - 11
uboot-envtools - 2015.10-1
ubox - 2017-03-10-16f7e161-1
ubus - 2017-02-18-34c6e818-1
ubusd - 2017-02-18-34c6e818-1
uci - 2018-01-01-141b64ef-1
uclient-fetch - 2017-11-02-4b87d831-1
uhttpd - 2017-11-04-a235636a-1
uhttpd-mod-ubus - 2017-11-04-a235636a-1
usign - 2015-07-04-ef641914-1
wpad-mini - 2016-12-19-ad02e79d-7

Here is my df -h, in case there's something wrong with it. I don't know if /rom is supposed to be full or not. I don't think it was on OpenWrt 15.05 but I can't remember for sure.

root@gateway:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    29.6M    576.0K     29.1M   2% /tmp
/dev/mtdblock3            4.4M      1.7M      2.7M  38% /overlay
overlayfs:/overlay        4.4M      1.7M      2.7M  38% /
tmpfs                   512.0K         0    512.0K   0% /dev

So, okay, there seem to be more problems. I incorrectly assumed that the networking was working fine because my internet was working fine, but of course, I'm connected through ethernet, which indeed works fine. I'm not getting my wireless network up, though, indicating that this is a bigger problem than just LuCI.

So I'm more or less wondering about the /rom partition. Is the problem perhaps that I simply don't have the space for the upgrade to have completed fully?

Run netstat -p -l -t

Let's see what processes are actually running.

root@gateway:~# netstat -p -l -t
Active Internet connections (only servers)
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      1131/dnsmasq
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      770/dropbear
tcp        0      0 :::domain               :::*                    LISTEN      1131/dnsmasq
tcp        0      0 :::ssh                  :::*                    LISTEN      770/dropbear

With or without "Keep settings"?

  1. This gives me a 404
  2. Why are you trying to install LuCI when it is already included in 17.01.4?

With "Keep settings".

Hmm, I don't know why, but the link above is missing the final character. Here is the correct one:

I just went by those instructions to make sure that I did indeed have the correct package installed and that I was starting it correctly. You're right, it was already installed, but I tried removing and re-installing it to see if that worked.

But I've actually managed to get it up and running again, although I'm still having trouble with the wifi.

It appears that my old configuration wasn't compatible with LEDE 17.01.4. The upgrade had put some new files in /etc/config and appended them with "-opkg". I backed up my own files and replaced them with the ones that came with the upgrade, and then restarting uhttpd worked again, and LuCI started working again, at least on port 80 (HTTP).

root@gateway:/etc/config# ls -l
-rw-r--r--    1 root     root         964 Jan 20 19:57 dhcp
-rw-r--r--    1 root     root        1.8K Apr 21  2017 dhcp.bak
-rw-r--r--    1 root     root         134 Dec 19  2017 dropbear
-rw-r--r--    1 root     root          62 Jul 26  2015 dropbear.bak
-rw-r--r--    1 root     root        2.9K Jun  4  2017 firewall
-rw-r--r--    1 root     root         564 May 28 02:35 luci
-rw-r--r--    1 root     root         742 Oct 17  2017 luci.bak
-rw-r--r--    1 root     root         780 Oct  1  2014 network
-rw-------    1 root     root          97 May 14 17:16 rpcd
-rw-r--r--    1 root     root         595 Jul 26  2015 system
-rw-r--r--    1 root     root           0 Oct  1  2014 ubootenv
-rw-r--r--    1 root     root         736 May 28 02:35 ucitrack
-rw-r--r--    1 root     root         717 Sep 20  2014 ucitrack.bak
-rw-------    1 root     root        3.7K Jan  8 05:02 uhttpd
-rw-------    1 root     root         576 Nov 19  2016 uhttpd.bak
-rw-r--r--    1 root     root         417 Jun 19 16:40 wireless

I'm still having trouble with getting the wifi network working, although it still remembers my old wifi name and such. It was left untouched in /etc/config/network (as I would expect), but there was no "-opkg" of that file so I'll have to mess around with it to see if I can get it working again.

In LuCI, it says "Wireless is disabled or not associated". It's definitely enabled, so I'm assuming it's not associated with an interface or something. But that's an entirely new problem, and I'll try my luck before bothering you good people about it with a new post.

So basically, the solution to get LuCI back up was to use the /etc/config/*-opkg files instead of the ones I inherited from OpenWrt 15.05 (quite possibly edited by myself at some point - I honestly can't remember).

Also, I'll need HTTPS on LuCI, but I'll figure that out myself, I'm sure.

Thanks for responding. :slight_smile:

There were config changes between those versions. Try resetting the router to defaults and setting it up from scratch.

Compare and copy/paste your old rules into the new OpenWrt instance.

Yeah, in fact, I've decided to just do the whole thing from scratch. I've just "upgraded" again (to the same version) without keeping settings. I'll go dig in the documentation on how to set it up now. Thanks. :slight_smile:

If your problem is solved (seems so), please consider marking this topic as [Solved].

1 Like

For the record, the "upgrade" without keeping settings went fine and everything is now up and running again. I simply copied the necessary configurations from my /etc/config/dhcp backup to get the MAC/IP/host configurations I had earlier.

@tmomas: Pardon my noobness, but how do I do that? Do you mean I should simply prepend the title of the original post?

Yes.

BTW, glad everything worked out!

Done, cool, thanks! :slight_smile:

1 Like

Just adding one more thing for future visitors who may have a problem with figuring out where to look for information that normally comes in logs under /var/log... it was actually the command logread -f that helped me identify the problem as a uhttpd configuration problem, which then let me to /etc/config. So logread -f is what you check instead of /var/log.

2 Likes

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