-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
UPSSCHED doesn't work correct with multiple UPSs #1858
Comments
Hi, looked through code and it boiled down to Try dropping the |
Are you in position to build NUT locally and test if PR #1861 fixes the original issue (allows to use e.g. |
I tried as you said:
What do you mean download branch again and install? |
Hm, I must have read not all of the code initially to trace the logic correctly, too much on the run between dayjob tasks :( So the So that PR is probably not needed after all, or at worst - should be changed to try adding Did you try bumping debug level of OT: Git has "brAnches". People have "brUnches", if they mix breakfast and lunch. |
Also, since you have a locally built NUT, you can add an |
Also, I would like to add one more problem related to the fact that the command is not executed - a new status is set: This causes all clients to simply shut down with error - power fail Syslog:
|
Thanks for pointing out my mistake, it's just a typo. |
This is a very good idea, but I did not understand exactly where to add |
Regarding the status, is it set after a real power outage? Was it long enough to deplete the battery and begin shutdown rituals (raise the FSD flag)? If yes, that flag can not be removed from the running NUT data server (at best, you can restart Some UPSes (typically enterprise networked ones) also have a concept of alarming their clients that it is not safe to be powered on (even if charging, the UPS does not have batteries full enough to let clients shut down in emergency), and that status can be relayed as NUT FSD as well. So you press the buttons to force a boot-up after an outage (rather than wait for UPS to charge and power on the load), then NUT starts, finds the alarm on expensive UPS, raises FSD and your system shuts down ASAP. |
Perhaps it is necessary to explain why I use upssched. So on the main server:
On all other servers:
For the test, I turn off the power plug of the riello1000 and with this configuration I see the following in the logs (at this moment) of the main server:
It seems to me that the problem is not only that the AT command is transferred - some permissions are interfering. Then the powerful server shuts down. After a few minutes I turned the power back on the riello1000 and waited 10 minutes. The wakeonlan command did not work. Nothing just happened. Only if I do the following on the main server:
Then the entire scenario is performed properly. |
FWIW, the https://github.com/jimklimov/nut/tree/issue-1858-debug branch (source of newer PR above) should help troubleshooting the It looks strange that two of your upsmon clients (from separate IP addresses) set the FSD flag... |
Can you start the As for permissions, check what user your copies of |
Apparently, this is due to the fact that on the secondary server it was specified in
Everything was done according to the instructions that I wrote earlier in another issue - #1754. I mean what: I will add more (main server):
|
By now I guess we have two or more problems to address separately here :)
|
Wondering now if you constrained |
No. Just create user and group.
|
I will try later and show output.
Running on the actual system
What specifically interests you? Just tell me - I will provide any configs. |
Regarding FreeBSD - just a generic curiosity. You mentioned that everyone shuts down "wrongly" (which you might have fixed now), and mentioned FreeBSD, but did not provide any screenshots so I have little idea if it also misbehaves in some special manner, or just followed FSD commands "honestly". |
When I changed on FreeBSD file
to
On main server nothing errors but FreeBSD server doesn't shutdown. Maybe permissions issue but in logs - nothing. How to correctly shutdown NOT main server? |
FreeBSD setup: rc.conf
nut.conf upsmon.conf
upssched.conf
|
One difference that pops out is Another is that if the system is not connected to the UPS signalling (does not/can not run a driver for it), it should not be
These do not always intersect, depending on how your monitoring is set up (e.g. if it is not powered by any of these UPSes it watches, it might have 0 PSU counts on all of them). |
Also with the |
Please tell me what exactly should be on all other servers to which the UPS is not directly connected (in other words, net clients)?
Something like this:
? Next what has already been done:
Everything works as expected. For a more accurate test, the following steps were also performed:
At the moment, I have not found any other problems related with UPSSCHED. But there are false indicators specifically on rps1000@localhost (on riello1000 this was not observed).
And that is probably a completely different story ;) (later I will create a new issue). |
"secondAry" in the keyword from your latest example. As for "what exactly" - pretty much as you wrote. That example however says two power sources are fed by riello1000 and zero by rps1000. I assume it has at least |
Hello, how did this progress with the upsmon and upssched parts of the problem? do they work for you now after all the config changes above? (also there was some progress merged on the master branch, you might want to update your custom build of NUT to check if that addressed your issues too...) |
First of all, thank you for your concern. |
Thanks! Drivers should be able to reconnect in case of USB port resets and other causes of dis- and re-connection on the HW/OS level, although the maturity of this ability may vary between drivers (e.g. more popular ones like Note also in the NUT GitHub Wiki and various docs in code, there are notes on actively causing USB port resets with (OS-dependent) third-party tools, if the device goes AWOL - usually based on a regular (cron?) FWIW, try also different cables and/or ports, that can do wonders :) Finally, on the "duplicate" device support: recently master branch got the ability to set and match (via |
HI,
My configuration consists of two UPS.
System: Debian Buster
NUT: 2.8.0.1 (installed from source)
upsmon.conf
upssched.conf
With this configuration UPSSCHED doesn't work, if I change to:
working perfectly.
Why I can't use specific UPS for this task?
The text was updated successfully, but these errors were encountered: