[Solved]No luci connection possible after reboot of newly flashed router

Hello,

I really don't know what to do. I just flashed my brand new R7800 from stock to openwrt-18.06.1-ipq806x-netgear_r7800-squashfs-factory.img. That worked fine and I configured it via LUCI. After unplugging the power cord and reconnecting it, I cannot connect via LUCI anymore. I tried several browsers (Android, IE, Chrome on Win10). However, I can connect via SSH and all configurations seem to be available.

I have nothing connected to the router and connect to the router via ethernetcable or wifi.

Any ideas what I can do?

try to connect via ssh and do the following commands

opkg update
opkg install luci

You probably don't have luci installed

Hmm, but I already used luci to configure my router after the initial flash. Since then only a reboot was conducted.

I'd start by checking the logs (run dmesg and logread from the command line) and try to start it manually:
# /etc/init.d/uhttpd start
to see what happens.

Anything I need to look at? I did what you described but couldn't identify anything special. However, the logs are quite large.

You should look for any sign of warnings or errors, especially related to uhttpd. Try rebooting to clear the logs of some unrelated lines.

Does the webserver run?

# ps | grep uhttpd

If you just installed luci and not one of the luci-ssl packages, you likely either have redirect_https set in /etc/config/uhttpd without having the required generated SSL certs, or you're tryring to navigate to HTTPS vs HTTP.

  • NOTE:
    • Logins to LuCI should never be done over plain HTTP, as that would send the root password as plain text

Thanks all for the support.

The hint regarding the /etc/config/uhttpd was a starting point. When opening the file, it seems corrupted. However, after flashing the device, I configured it via LUCI and downloaded a backup via LUCI functionality. After I replaced the /etc/config/uhttpd by the file from my backup and /etc/init.d/uhttpd restart the web login screen came up. However, my password is not accepted, although it still works under ssh. Any ideas?

Is your SSH key encrypted?

  • SSH root password login should be disabled immediately upon logging in for the first time, with Public Key Encryption as the only method that should be utilized, as it's the only secure method.

  • There's no way for the LuCI password to be different than the SSH password, unless you're utilizing an SSH key, as LuCI requires the root password for login, hence why it should never be accessed over non-HTTPS connections.
    • To reset the root password, simply issue passwd

Thanks. After trying and trying and trying I reflashed the device with a new image. The only thing I did differently compared to my last 2 flashes was, that I rebooted the device via LUCI before powering it off. Now everything works fine so far. It seems that some files (e.g. /etc/config/uhttpd) get corrupted, when flashing and unplugging power before rebooting.

Whenever you flash a device, you must allow it to reboot before powering it off, else you risk bricking the device by interrupting it mid-flash.

1 Like

Thanks. I mean, I let it reboot directly after the flash. Then I configured it via LUCI and saved+applied everything. BUT the first two times I powered the device off after that. Both times at least the /etc/config/uhttpd was corrupted (file full of NULL values). After the third flash I did the same as before but rebooted it via LUCI before powering it off. Doing so, the /etc/config/uhttpd still was fine after reboot.

That's odd, but could result from the following:

  • Not waiting for the Save & Apply to fully complete
  • Having a network traffic issue mid save

uHTTPd is a synchronous web server, so as long as the Save & Apply was allowed to fully finish, the config file changes will be instantaneous, saved to /overlay.

If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

You can also mark the reply that solved your problem:
grafik

I had the exact same problem today (so thanks for putting me on the right path). I took a chance and replaced /etc/config/uhttpd with /rom/config/uhttpd and now luci is back.

However, the login page won't accept my root/password login (works with SSH).

edit. rpcd and ucitrack were corrupted as well (non-zero size, but empty with "cat"). After fixing them, I can log in into luci. I don't know if files in other directories are corrupted as well so maybe a reflash is the only safe option.

1 Like

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