OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version openwrt-18.06
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Stevie-O - 26.05.2019

FS#2295 - Website interface not accessible via port 80

Model Buffalo WZR-HP-G300NH
Architecture Atheros AR9132 rev 2
Firmware Version OpenWrt 18.06.2 r7676-cddd7b4c77 / LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d)
Kernel Version 4.9.152

After boot, I cannot access the configuration interface via port 80.
Investigation reveals the following:

- netstat: uhttpd is not listening on port 80

# netstat -anp | grep uhttpd
tcp 0 0 0.0.0.0:9443 0.0.0.0:* LISTEN 921/uhttpd
tcp 0 0 0.0.0.0:9080 0.0.0.0:* LISTEN 921/uhttpd

- ps: uhttpd _should_ be listening on port 80

# ps | grep uhttpd

921 root      1328 S    /usr/sbin/uhttpd -f -h /www -r skynet -x /cgi-bin -t 60 -T 30 -A 1 -n 3 -R -p 0.0.0.0:9080 -p <br-lan IP>:80 -p 0.0.0.0:9443

- logread: Something went screwy at startup

# logread | grep httpd
Sun May 26 11:51:26 2019 daemon.err uhttpd[921]: bind(): Address not available

If I run `/etc/init.d/uhttpd restart`, the service comes up properly, listening on port 80; this suggests that something is interfering during early startup, though I have no idea what it could possibly be.

Stevie-O commented on 25.06.2019 23:15

I don't know what you're getting at here, psyborg.

My problem has nothing to do with HTTPS; my problem is that the uhttpd server is not binding to port 80 on the local interface.

The output of logread says that bind() failed with "Address not available". My research suggests that this is EADDRNOTAVAIL, and (furthermore) that this error is returned when no network interface has the associated address.

The fact that it fails after a reboot, but not after logging in and manually restarting the service, suggests that there's a race condition in the startup code, wherein the init scripts that launch uhttpd are running before the network interfaces have been fully initialized.

psyborg commented on 27.06.2019 11:10

1. forcing https (which is default) could (should) prrevent binding to port 80, regardless of your config

2. how did you end up with a <br-lan IP>:80 wildcard there? info in luci clearly says: Bind to specific interface:port (by specifying interface address

3. even if wildcard is supported since some point in trunk, we don't know your br-lan setup. it could be vpn tunneled connection that inits at the end of boot process..

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing