Getting ERR_CONNECTION_REFUSED trying to access LUCI

Hi there,
I updated the OpenWRT-Image on my TP-Link Archer C60 V1 yesterday.
The image file I've used is

openwrt-19.07.6-ath79-generic-tplink_archer-c60-v1-squashfs-sysupgrade.bin

After update, it was not possible to connect to the LUCI web interface.
SSH and SCP are available, so I could configure the router as DumbAP. It works.

But everytime I try to do the HTTP request to LUCI, I get ERR_CONNECTION_REFUSED.
Could you give me an idea, what is going on?

@henrykf , welcome to the community!

  • Did you keep the configs or reset to defaults?
  • Have you tried resetting it?
1 Like

I tried both possibilities, with keeping the settings and flashing again without this option checked.

With keeping the settings, the router had a weird behavior. After flashing, it was still the old firmware active. But the next morning it was started with the new one. As I still couldn't see the LuCI, I reseted the router and the old firmware was there again.

So I flashed again, without keeping settings and finally the router started with the new Firmware. I was able to configure it over SSH and SCP, but LuCI is not there

https://openwrt.org/docs/guide-user/luci/luci.essentials#basic_installation

As far I can say, LuCI is installed but not answering. I've done all the steps in the basic Installation doc. It didn't change anything.

uci show uhttpd; uci show luci; \
netstat -l -n -p | grep -e uhttpd; pgrep -f -a uhttpd

I'm facing the same issue. In the logs I can see uhttpd is failing to start:

Mon Feb 15 18:40:20 2021 daemon.err uhttpd[7511]: Error loading shared library libubox.so: No such file or directory (needed by /usr/sbin/uhttpd)
Mon Feb 15 18:40:20 2021 daemon.err uhttpd[7511]: Error loading shared library libjson_script.so: No such file or directory (needed by /usr/sbin/uhttpd)
Mon Feb 15 18:40:20 2021 daemon.err uhttpd[7511]: Error loading shared library libblobmsg_json.so: No such file or directory (needed by /usr/sbin/uhttpd)

If I install the missing packages, uhttpd will run but Luci fails:

/usr/lib/lua/luci/dispatcher.lua:427: /etc/config/luci seems to be corrupt, unable to find section 'main'

It's strange that there were missing packages to begin with, so I checked the install log and see that it failed during installation:

Configuring rpcd-mod-file.
Configuring rpcd-mod-luci.
Command failed: Not found
Configuring luci-base.
...
Configuring uhttpd-mod-ubus.
Configuring rpcd-mod-rrdns.
Command failed: Not found
Configuring luci.

Any idea what that command failed is and what I can do?

Here is the output:

uhttpd.main=uhttpd
uhttpd.main.listen_http='0.0.0.0:80' '[::]:80'
uhttpd.main.listen_https='0.0.0.0:443' '[::]:443'
uhttpd.main.redirect_https='1'
uhttpd.main.home='/www'
uhttpd.main.rfc1918_filter='1'
uhttpd.main.max_requests='3'
uhttpd.main.max_connections='100'
uhttpd.main.cert='/etc/ssl/uhttpd.crt'
uhttpd.main.key='/etc/ssl/uhttpd.key'
uhttpd.main.cgi_prefix='/cgi-bin'
uhttpd.main.lua_prefix='/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua'
uhttpd.main.script_timeout='60'
uhttpd.main.network_timeout='30'
uhttpd.main.http_keepalive='20'
uhttpd.main.tcp_keepalive='1'
uhttpd.defaults=cert
uhttpd.defaults.days='730'
uhttpd.defaults.key_type='rsa'
uhttpd.defaults.bits='2048'
uhttpd.defaults.ec_curve='P-256'
uhttpd.defaults.country='DE'
uhttpd.defaults.state='xxx'
uhttpd.defaults.location='xxxxx'
uhttpd.defaults.commonname='xxxxxxx'
luci.main=core
luci.main.lang='auto'
luci.main.mediaurlbase='/luci-static/bootstrap'
luci.main.resourcebase='/luci-static/resources'
luci.main.ubuspath='/ubus/'
luci.flash_keep=extern
luci.flash_keep.uci='/etc/config/'
luci.flash_keep.dropbear='/etc/dropbear/'
luci.flash_keep.openvpn='/etc/openvpn/'
luci.flash_keep.passwd='/etc/passwd'
luci.flash_keep.opkg='/etc/opkg.conf'
luci.flash_keep.firewall='/etc/firewall.user'
luci.flash_keep.uploads='/lib/uci/upload/'
luci.languages=internal
luci.languages.de='Deutsch (German)'
luci.sauth=internal
luci.sauth.sessionpath='/tmp/luci-sessions'
luci.sauth.sessiontime='3600'
luci.ccache=internal
luci.ccache.enable='1'
luci.themes=internal
luci.themes.Bootstrap='/luci-static/bootstrap'
luci.apply=internal
luci.apply.rollback='90'
luci.apply.holdoff='4'
luci.apply.timeout='5'
luci.apply.display='1.5'
luci.diag=internal
luci.diag.dns='openwrt.org'
luci.diag.ping='openwrt.org'
luci.diag.route='openwrt.org'
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1051/uhttpd
tcp        0      0 :::80                   :::*                    LISTEN      1051/uhttpd
1051 /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -t 60 -T 30 -k 20 -A 1 -n 3 -N 100 -R -p 0.0.0.0:80 -p [::]:80

I can't find the log files. Where are they?

1 Like

@henrykf, make sure you are using HTTP protocol in the browser address line, or provide encryption.

https://openwrt.org/docs/guide-user/luci/luci.essentials#providing_encryption

@tiagojsrios

mv -f /overlay/upper/etc/config/luci /etc/config/luci

@vgaetera I couldn't run the command, as mv was returning 'couldn't find luci as a directory or file'. However, a more recent snapshot solved the initial issue.

Thanks anyways.

1 Like

Hmm. All packages, luci-ssl as well are installed.

1 Like

For some reason uHTTPd is not listening on 443/TCP.
You can try to debug the relevant part of the init script:

OK. I've got it.
The 443 port was the hint. I've installed the luci-ssl package again. And now it is running.
I have no idea, what was wrong with the first installation.
Thanks guys!

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