New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os-nut causes OPNsense web GUI to lock up under certain configurations #3304
Comments
As far as I know nut fails to do a proper timeout. Strategies it mitigate are expensive in terms of code and general effectiveness is probably still not enough. |
This is a known problem of nut itself, theres not much we can do here |
Can the web GUI do this request asynchronously, so that at least it doesn't cause the whole interface to hang? Perhaps the localhost IP should not be removable from the NUT plugin's configuration? I'm not sure what specific use-cases preventing its removal would break though, so perhaps that's not feasible. |
All “wrong” input will cause this. This isn’t a validation issue around 127.0.0.1 or similar. Asynch works but not without doing a lot of extra work. PR welcome but as I said the benefit is lower than useful for the cases where this is misconfigured. Perhaps the read timeout by configd/configctl could be reduced in this case only. |
Interesting bug report, thanks for digging deeper into this @davemsh I had the issue too and for me the cause was the missing 127.0.0.1 as NUT listening address. Adding it was a simple solution here. The issue only exists if you click the "Diagnostics" tab. Using the CLI for querying the UPS works without issues (because you can always stop the command using CTRL+C). So before using this tab one could verify if the config is working by testing the command One simple solution (I could do that) would be to adapt the description of the listening address. Currently it says "Set the addresses this service listen on.". We could add a warning here that removing 127.0.0.1 causes the GUI to hang if someone clicks on Diagnostics. Would maybe prevent people from removing it. I also want to add that the issue resolves automatically after around 20 minutes. So NO reboot is required – just waiting is sufficient. If you are speaking German you can get more details on the issue in my blogpost. |
Thanks for the feedback, guess I just didn't wait long enough before rebooting. Agreed, updating the description to provide a warning could be a decent change if the overall issue is difficult to prevent. |
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
In the os-nut plugin, if the localhost 127.0.0.1 listen address is not accessible, attempting to access the Services->Nut->Diagnostics tab causes the entire OPNsense web GUI to lock up and become completely unresponsive. Network traffic passing through OPNsense appears unaffected by this.
I accidentally caused this to happen in two different ways. In both cases, the web GUI never never recovers until the system is rebooted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected behavior is that the OPNsense web GUI does not become unresponsive given the above steps, and that there be a warning of some sort when removing 127.0.0.1 from the listen addresses that doing so will prevent the Diagnostic tab from functioning.
Screenshots
No relevant screenshots.
Relevant log files
These log messages get repeated once or twice per minute until the system is rebooted. It is unclear if repeats are due to automatic polling or from my attempts to regain access to the web GUI via page reloads.
Additional context
N/A
Environment
OPNsense 22.7.11_1-amd64 (OpenSSL)
os-nut 1.8.1_1
The text was updated successfully, but these errors were encountered: