So this morning I tried to log into foris/luci on my Omnia. I was greeted with a dropped connection every time.
On investigation the lighthttpd logs contained
2016-12-23 11:55:52: (connections-glue.c.289) connection closed - read failed: Function not implemented 38
over and over and over, once for every connection attempt.
Restarting lighthttpd with
/etc/init.d/lighttpd restart
… solved the problem.
My Omnia is completely vanilla in terms of software.
Model Turris Omnia
Firmware Version OpenWrt omnia 15.05 r47055 / LuCI 5ca9e5d2391f6ca149db4e53cda7c8f5d3ef6644 branch (git-16.335.29518-5ca9e5d)
Kernel Version 4.4.38-efe609c5e5f25db4116d69128330872c-1
I have the same issue, and as well often when configuring the leds, restart of lighttpd works every time.
And as I remember I had this issue on previous version too.
I’m having this issue after adding some custom firewall rules. Now if I try to add a new rule under traffic, it ends up crashing, but not all the time.
I played with the LED config and firewall rules and did not see this issue, but I was using https:// (also recommended by @hdBerretz above)
On Linux, 38 is for ENOSYS. That error is coming from the kernel after a call to read(). A configuration change by a process outside of lighttpd should not mess with a socket inside lighttpd after accept(), unless networking was being torn down and restarted on the system, or perhaps firewall connection tracking information flushed. Also, I have no idea why https would make a difference. For those seeing this, does using https make a difference? If not, would you mind posting more detailed instructions on what you did (whether in Foris, or LuCI, or command line) to trigger the issue?
Thank you @pav for trying to provide additional information.
I (lighttpd developer) would love to track this down, but have been unable to reproduce this on my Turris Omnia. For everyone saying “me, too”, please post more details of precisely what you were doing when this occurs. Again, if I can’t reproduce this, I can’t help provide a solution. ENOSYS “Function not implemented” is something which should not happen on a read() of an already opened file descriptor, so something is probably happening in firewall or kernel.
There are known bugs in opkg for which I provided patches. The patches have been accepted into LEDE, and I mentioned them to turris support, but I don’t believe they have been integrated into Turris yet. https://github.com/openwrt/packages/issues/1922
For those having this problem, please edit /etc/lighttpd/conf.d/luci.conf and change “setenv.set-environment” to be “setenv.add-environment”. Then, restart lighttpd and see if you can reproduce the “connection closed - read failed” issue.
For those getting this error, how are you connecting to the router? Wired or wireless connection? If everyone having this issue is running LuCI via a wireless connection to the router, that would be useful information. When you get this error message from lighttpd error.log, is there any information in ‘dmesg’ about the same time, perhaps related to network interfaces going down and up?