NUT package (2.8.0 and below)
-
@dennypage
many thanks for the explanation.
I guess the nut package could be changed so that it does not send messages like "Communications with UPS UPS lost" and "UPS UPS is unavailable" every time it gets restarted by pfsense? -
@flu The email comes from NUT itself, rather than the pfSense NUT package. And from NUT's point of view, the connection to the UPS is actually being lost. This will be triggered by something that affects the USB or serial connectivity being restarted or reloaded underneath NUT. NUT doesn't know why the connection failed, it just knows that it failed so it sends the email. You should be able to see the order of events in the system log if you want to understand more about what is happening.
-
@dennypage So here's what I noticed recently in my system logs after receiving UPS communication lost and established emails:
Feb 19 04:33:53 php-cgi nut_email.php: Message sent to kevindd992002@yahoo.com OK Feb 19 04:33:49 php-cgi nut_email.php: Message sent to kevindd992002@yahoo.com OK Feb 19 04:33:46 upsmon 43175 Communications with UPS ups established Feb 19 04:33:44 upsd 86349 UPS [ups] data is no longer stale Feb 19 04:33:41 upsmon 43175 Communications with UPS ups lost Feb 19 04:33:41 upsmon 43175 Poll UPS [ups] failed - Data stale Feb 19 04:33:41 kernel ugen0.2: <EATON 5E> at usbus0 Feb 19 04:33:38 kernel ugen0.2: <EATON 5E> at usbus0 (disconnected) Feb 19 04:33:37 upsd 86349 Data for UPS [ups] is stale - check driver
What does "data is stale" even mean? And why does this happen intermittently?
-
@kevindd992002 said in NUT package:
What does "data is stale" even mean? And why does this happen intermittently?
Probably because :
Feb 19 04:33:38 kernel ugen0.2: <EATON 5E> at usbus0 (disconnected)
Feb 19 04:33:37 upsd 86349 Data for UPS [ups] is stale - check driverwhich says to me that the link between the driver (NUT ?) and the UPS device (cable, whatever) isn't "stable".
-
@Gertjan said in NUT package:
@kevindd992002 said in NUT package:
What does "data is stale" even mean? And why does this happen intermittently?
Probably because :
Feb 19 04:33:38 kernel ugen0.2: <EATON 5E> at usbus0 (disconnected)
Feb 19 04:33:37 upsd 86349 Data for UPS [ups] is stale - check driverwhich says to me that the link between the driver (NUT ?) and the UPS device (cable, whatever) isn't "stable".
Right but it's just weird that it happens randomly. It's not the UPS and cable because those were replaced already. I also tried using another usb port on the apu2c4 to no avail. There are only 2 usb ports available. Maybe the hub itself? How can you tell for sure though?
-
@kevindd992002 It's either the host end or the UPS end. On the host end, it can be hardware (bridge controller) or software (kernel driver). On the UPS end it would just be a flakey USB implementation.
What I generally recommend to people having these types of issues:
- Try a different port on the host that uses a different bridge chip. Favor ports that are USB 2 as USB 3 ports usually have more problems.
- If you have a USB hub between the host and the UPS, try removing it.
- If you don't have a USB hub between the host and the UPS, try adding one.
- Try a different USB hub that uses a different bridge chip.
- Try a different UPS model.
- Try a different host model.
Regarding the apu2c4, you might find this an interesting read.
Bonne chance
-
@dennypage I'm seeing the following log entries under 2.4.5, anything to be concerned about?
Apr 16 07:09:28 upsmon 92379 Communications with UPS UPS established Apr 16 07:09:28 upsd 33793 User local-monitor@127.0.0.1 logged into UPS [UPS] Apr 16 07:09:23 upsmon 92379 Communications with UPS UPS lost Apr 16 07:09:23 upsmon 92379 Poll UPS [UPS] failed - Write error: Permission denied Apr 16 07:09:21 nginx 2020/04/16 07:09:21 [crit] 11971#100993: *62736 SSL_write() failed (13: Permission denied) while processing HTTP/2 connection, client: 192.168.20.115, server: 0.0.0.0:4433 Apr 16 07:08:43 upsmon 92379 Communications with UPS UPS established Apr 16 07:08:43 upsd 33793 User local-monitor@127.0.0.1 logged into UPS [UPS] Apr 16 07:08:38 upsmon 92379 Communications with UPS UPS lost Apr 16 07:08:38 upsmon 92379 Poll UPS [UPS] failed - Write error: Permission denied
-
@q54e3w Can you provide information on your NUT configuration please?
-
UPS is a network connected Eaton 9PX with Network Card 2.
UPS Type: Remote SNMP
UPS Name: UPS
Notifications: EnabledDriver Settings
Remote IP: 192.168.10.42
Extra args:
mibs = pw
pollfreq = 15
ignorelbAdvanced Settings
FINALDELAY 180
Addition configuration lines for ups.conf = LISTEN 192.168.10.1
Additional ups.users
[remoteuser]
password = mysupersecretpassword
upsmon slaveThis provides the following status
UPS Status
Name: UPS@localhost
Summary status: On line
Runtime (H:M:S): 5:17:00
UPS Load:
36.00%
Battery charge:
100.00%
Battery voltage: 52.00
Input frequency: 60.00 -
@q54e3w said in NUT package:
Poll UPS [UPS] failed - Write error: Permission denied
Is there anything that precedes this entry in the log? Perhaps something similar to this?
-
@dennypage said in NUT package:
Is there anything that precedes this entry in the log? Perhaps something similar to this?
No, no other errors or messages from upsd/upsmon above or below that one. First sign of trouble is the Poll UPS failed.
-
@q54e3w said in NUT package:
@dennypage said in NUT package:
Is there anything that precedes this entry in the log? Perhaps something similar to this?
No, no other errors or messages from upsd/upsmon above or below that one. First sign of trouble is the Poll UPS failed.
I wasn’t asking about other upsd/upsmon messages, rather I was asking about messages associated with links flapping, DHCP activities, etc. Similar to the logs in the link above.
-
ahhhh, gotcha. There was another issue with UPnP that I resolved and thats when I noticed these entries. I'll keep an eye on it but as I haven't seen a repeat maybe it was related. Thank you.
-
@dennypage Why is it that in the NUT GUI I see different set of parameters shown between my two pfsense boxes (same version of pfsense, same hardware, same NUT version, different UPS but both USB):
I'm missing battery voltage and last test result on the second one. Is this normal?
-
@kevindd992002 said in NUT package:
@dennypage Why is it that in the NUT GUI I see different set of parameters shown between my two pfsense boxes (same version of pfsense, same hardware, same NUT version, different UPS but both USB):
I'm missing battery voltage and last test result on the second one. Is this normal?
Not unusual. NUT only reports what what the UPS reports.
-
True.
This wouldn't be very assuring :( image is fake of course )
-
Ok, that makes sense.
Any idea what can causes a UPS battery low notification even though I don't see a UPS on battery message first? Here's what I get in the system logs:
I've noticed this come and go since a few days ago and I don't know why. I was receiving email notifications about a batt low condition even without an on batt notification first. These are the settings I have:
I don't see the charge.warning and charge.low that high. But what do you think?
Also, how can I set the UPS (after a shutdown condition) to wait for a few minutes before it turns everything back on? Sort of a delay?
-
@kevindd992002 said in NUT package:
causes a UPS battery low notification even though I don't see a UPS on battery message first?
If a battery was a perfect device, it couldn't be low. But they are not. They always die .... which start with the tension that starts dropping. It isn't needed to be on battery to see that happen.
It could also be the charging electronics that adapts it's loading tension, because the load current start to rise for some reason.Also, the "UPS battery low notification" could also be a generic message from the UPS that is shown "as is" by NUT.
@kevindd992002 said in NUT package:
Also, how can I set the UPS (after a shutdown condition) to wait for a few minutes before it turns everything back on? Sort of a delay?
You should add a question to your question :
Does my UPS supports this ?
And if the answer is yes, ask another yourself another question : Is it possible with NUT and the UPS driver to communicate such a setting ?
If yes, then yes, it can be done.
How ? Dono. Up to you to search for it.Btw : the pfSense widget is nice to see the situation.
But UPS's (batteries) should be observed over (very long) time spans. Use tools like this to see more info. -
@Gertjan said in NUT package:
@kevindd992002 said in NUT package:
causes a UPS battery low notification even though I don't see a UPS on battery message first?
If a battery was a perfect device, it couldn't be low. But they are not. They always die .... which start with the tension that starts dropping. It isn't needed to be on battery to see that happen.
It could also be the charging electronics that adapts it's loading tension, because the load current start to rise for some reason.Also, the "UPS battery low notification" could also be a generic message from the UPS that is shown "as is" by NUT.
That's the answer I'm expecting. I completely know that batteries tend to die, especially in hot climates. I just thought there's an issue with NUT or something because it was fine a few days ago. There was just a blackout a few weeks ago where the battery was fully depleted in about 10 minutes so I knew it was working fine.
@kevindd992002 said in NUT package:
Also, how can I set the UPS (after a shutdown condition) to wait for a few minutes before it turns everything back on? Sort of a delay?
You should add a question to your question :
Does my UPS supports this ?
And if the answer is yes, ask another yourself another question : Is it possible with NUT and the UPS driver to communicate such a setting ?
If yes, then yes, it can be done.
How ? Dono. Up to you to search for it.Btw : the pfSense widget is nice to see the situation.
But UPS's (batteries) should be observed over (very long) time spans. Use tools like this to see more info.Yes, I have to search if my UPS supports it. And yes, I'm sure NUT and the USB ups driver can communicate this setting. I read about it somewhere but cannot find that specific post anymore. This is why I posted here. I guess I have to search harder.
What is that pfsense widget you've linked? Is it a package or something? I'm not seeing such a widget in the available widgets section.
-
@kevindd992002 said in NUT package:
I guess I have to search harder.
Or being lucky : someone knows what you're asking, and has the same UPS as you (APC SUA750).
I advise you to put chances on your side ;)@kevindd992002 said in NUT package:
package or something?
Munin.
It exists as a native FreeBSD package. To install it, the traditional FreeBSD CLI commands are needed.
You also need a web server 'some where' that will be hosting the Munin RRD-to-Images.
This means a Munin-client on pfSense, and a Munin server somewhere else.
I have multiple servers, so it somewhat pays of for me to use such a graph service. It reveals a lot of info over time.