Missing .js files for luci

I've noticed this problem both in 19.07 and in master. I did look around in the code for a short time to see what was causing it, but could not find it. In my defense, I only looked for about 10 minutes before I got sidetracked.

This happens with both uhttpd and with nginx because the files are really not there. Previously the error messages were not actually appearing in my logs but I could see them from the browser debug console. Since I enabled collectd, the errors are now appearing in my log files as well

The logs below are from an openwrt compiled from master today, so up to date to commit 94f344

May 11 00:29:05 openwrt nginx[7059]: 2020/05/11 00:29:05 [error] 8472#0: *182 open() "/www/luci-static/resources/protocol/batadv.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 00:29:05 openwrt nginx[7059]: 2020/05/11 00:29:05 [error] 8472#0: *221 open() "/www/luci-static/resources/protocol/batadv_hardif.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/   resources/protocol/batadv_hardif.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 00:29:05 openwrt nginx[7059]: 2020/05/11 00:29:05 [error] 8472#0: *181 open() "/www/luci-static/resources/protocol/batadv_vlan.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/     resources/protocol/batadv_vlan.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 00:29:05 openwrt nginx[7059]: 2020/05/11 00:29:05 [error] 8472#0: *176 open() "/www/luci-static/resources/protocol/bonding.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/         resources/protocol/bonding.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"

It happens in a couple of places. Here's one from loading the status overview pages

May 11 01:06:01 openwrt nginx[7059]: 2020/05/11 01:06:01 [error] 8472#0: *3424 open() "/www/luci-static/resources/protocol/batadv.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 01:06:01 openwrt nginx[7059]: 2020/05/11 01:06:01 [error] 8472#0: *3112 open() "/www/luci-static/resources/protocol/batadv_hardif.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv_hardif.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 01:06:01 openwrt nginx[7059]: 2020/05/11 01:06:01 [error] 8472#0: *3448 open() "/www/luci-static/resources/protocol/batadv_vlan.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv_vlan.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 01:06:01 openwrt nginx[7059]: 2020/05/11 01:06:01 [error] 8472#0: *3138 open() "/www/luci-static/resources/protocol/bonding.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/bonding.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/statistics/collectd"
May 11 01:06:55 openwrt nginx[7059]: 2020/05/11 01:06:55 [error] 8472#0: *3424 open() "/www/luci-static/resources/protocol/batadv.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/status/overview"
May 11 01:06:55 openwrt nginx[7059]: 2020/05/11 01:06:55 [error] 8472#0: *3448 open() "/www/luci-static/resources/protocol/batadv_hardif.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv_hardif.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/status/overview"
May 11 01:06:55 openwrt nginx[7059]: 2020/05/11 01:06:55 [error] 8472#0: *3646 open() "/www/luci-static/resources/protocol/batadv_vlan.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/batadv_vlan.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/status/overview"
May 11 01:06:55 openwrt nginx[7059]: 2020/05/11 01:06:55 [error] 8472#0: *3282 open() "/www/luci-static/resources/protocol/bonding.js" failed (2: No such file or directory), client: 192.168.2.2, server: _lan, request: "GET /luci-static/resources/protocol/bonding.js?v=git-20.128.65152-f8cf115 HTTP/1.1", host: "192.168.1.1", referrer: "https://192.168.1.1/cgi-bin/luci/admin/status/overview"

@jow - maybe you have some idea where these are coming from?

They're missing indeed, which is expected. No idea why collect causes them to be forwarded to the syslog.

Can you point me to the logic in the code that causes the web server to try to load them and see if I can track down why the error messages are being emitted?

Well it simply invokes ubus call network get_proto_handlers and the browser attempts to fetch a matching JS class for each handler. Since there are no LuCI proto handlers for batadv, batadv_vlan, batadv_hardif and bonding, you'll see those 404 errors.

These logs are normal webserver access logs it seems.

1 Like