Can't connect to Web Page on GL-MT6000(Flint 2)

I am unable to authenticate to the admin web page. The router is working like it should and I am able to ssh, it's just the web page.

When I get to the web page I put in my password and I get the following error...

Unknown error occurred. Please check the network environment or reboot the device.

I ssh'd into the router and reviewd the contents of /var/log/nginx/error.log...

2024/05/24 06:36:28 [crit] 28922#0: *2 connect() to unix:/var/run/ngx-ubus-proxy.sock failed (2: No such file or directory), client: 172.16.7.2, server: , request: "POST /rpc HTTP/1.1", host: "172.16.4.2", referrer: "https://172.16.4.2/"
2024/05/24 06:36:28 [error] 28922#0: *2 lua entry thread aborted: runtime error: /usr/share/gl-ngx/oui-rpc.lua:61: attempt to index local 'res' (a nil value)
stack traceback:
coroutine 0:
        /usr/share/gl-ngx/oui-rpc.lua:61: in function '?'
        /usr/share/gl-ngx/oui-rpc.lua:154: in function </usr/share/gl-ngx/oui-rpc.lua:1>, client: 172.16.7.2, server: , request: "POST /rpc HTTP/1.1", host: "172.16.4.2", referrer: "https://172.16.4.2/"

The ngx-ubus-proxy.sock file infact does not exist in that directory. Here the contents of the directory...

root@GL-MT6000:~# ls -l /var/run/ngx-ubus-proxy.sock
ls: /var/run/ngx-ubus-proxy.sock: No such file or directory
root@GL-MT6000:~# ls -l /var/run/
drwxr-xr-x    2 nobody   nogroup         80 May 23 21:43 avahi-daemon
drwxr-xr-x    2 root     root            40 May 23 21:43 cloud
-rw-r--r--    1 root     root          3898 May 23 21:43 config.md5
-rw-r--r--    1 root     root             5 May 23 21:43 crond.pid
drwxr-xr-x    2 root     root            60 May 23 21:43 dbus
-rw-r--r--    1 root     root             5 May 23 21:43 dbus.pid
drwxr-xr-x    2 dnsmasq  dnsmasq         60 May 23 22:23 dnsmasq
-rw-r--r--    1 root     root             5 May 23 21:43 dropbear.1.pid
srwxr-xr-x    1 root     root             0 May 23 21:43 fcgiwrap.socket
-rw-r--r--    1 root     root           996 May 23 21:43 fw3.state
drwxr-xr-x    2 root     root            60 May 23 21:43 modem
-rw-r--r--    1 root     root             6 May 24 06:36 nginx.pid
drwx------    2 root     root            40 May 23 21:43 rpcd
drwxr-xr-x    2 ubus     ubus            60 Dec 31  1969 ubus
-rw-r--r--    1 root     root             5 May 23 21:43 udhcpc-eth1.pid
srw-rw-rw-    1 root     root             0 May 23 22:23 usbmuxd
-rw-r--r--    1 root     root             4 May 23 22:23 usbmuxd.pid
drwxr-xr-x    2 root     root            40 May 23 21:43 vsftpd
-rw-------    1 root     root             0 May 23 21:43 xtables.lock
root@GL-MT6000:~# ls -l /var/run/ubus/
srw-rw-rw-    1 ubus     ubus             0 Dec 31  1969 ubus.sock

I am on the latest firmware. I tried to reboot a few times

Did you modify anything?
Which exactly firmware version are you running?

I did a bunch of modifications to my settings but nothing on the nginx configuration.

I am on V4.5.8

If you are totally sure you did not change the nginx config, you can try to restore the original one:

/etc/init.d/nginx stop
cp -R /rom/etc/nginx /etc/nginx
/etc/init.d/nginx start

Should restore the original one.


Oh, and make sure you did not change something connected to lua on your router. Lua is highly used by all GL applications.

I've got the same problem "Unknown error occurred. Please check the network environment or reboot the device."

I didn't change anything lately. It was on 4.5.8 as I recall.

I've did what you wrote:
/etc/init.d/nginx stop
cp -R /rom/etc/nginx /etc/nginx
/etc/init.d/nginx start

but it didn't help.

got the same errors as the OP:

	/usr/share/gl-ngx/oui-rpc.lua:154: in function </usr/share/gl-ngx/oui-rpc.lua:1>, client: 192.168.0.101, server: , request: "POST /rpc HTTP/1.1", host: "192.168.0.1:448", referrer: "https://192.168.0.1:448/"
2024/05/29 13:49:14 [crit] 29879#0: *12 connect() to unix:/var/run/ngx-ubus-proxy.sock failed (2: No such file or directory), client: 192.168.0.101, server: , request: "POST /rpc HTTP/1.1", host: "192.168.0.1:448", referrer: "https://192.168.0.1:448/"
2024/05/29 13:49:14 [error] 29879#0: *12 lua entry thread aborted: runtime error: /usr/share/gl-ngx/oui-rpc.lua:23: attempt to index local 'res' (a nil value)
stack traceback:
coroutine 0:
	/usr/share/gl-ngx/oui-rpc.lua:23: in function '?'
	/usr/share/gl-ngx/oui-rpc.lua:154: in function </usr/share/gl-ngx/oui-rpc.lua:1>, client: 192.168.0.101, server: , request: "POST /rpc HTTP/1.1", host: "192.168.0.1:448", referrer: "https://192.168.0.1:448/"

Well, I've did update to 4.6.0 beta2 from LuCi and now it's OK but in the:
/var/log/nginx/error.log every few seconds I do get:

2024/05/29 14:18:58 [error] 5760#0: *517 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:03 [error] 5760#0: *537 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:05 [error] 5760#0: *539 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:08 [error] 5760#0: *541 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:11 [error] 5760#0: *561 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:14 [error] 5760#0: *563 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:15 [error] 5760#0: *565 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:20 [error] 5760#0: *567 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:24 [error] 5760#0: *587 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:29 [error] 5760#0: *589 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:34 [error] 5760#0: *609 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:39 [error] 5760#0: *611 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:42 [error] 5760#0: *631 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"
2024/05/29 14:19:44 [error] 5760#0: *633 open() "/www/ws" failed (2: No such file or directory), client: 192.168.0.101, server: , request: "GET /ws?sid=LOUlnjXx7PwDNGRDg3F7FN8wjZmdm0dN HTTP/1.1", host: "192.168.0.1:448"

and the file is growing up

It seems you changed something in LUA. That is really problematic.

I think you should run:

firstboot

This should revert problems

I ended up doing a hardware reset on my router and it's been good since.

I think my specific problem may have been a result of me doing opkg upgrades in the underlying OpenWRT OS.

Yup, don't do this - it's not how updating works on GL firmware.

1 Like