[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

44 minutes ago, ich777 said:
1 hour ago, Rysz said:

Is it then really a good idea to make the already quite large step from a well tested and stable 2.7.4 to a newer 2.8.0

Why is this a big step? Updates are good in general, I really don't like the idea of always staying on a low version to avoid issues for users who have no issues but maybe make it harder for new users with newer UPS units which are maybe supported by the newer version.

 

NUT 2.8.0 RC3 has been released 04-2022, it's already 07-2023. The plugin has been bundling a 7 year old release (built as a package last 3 years ago) as it's default package until now.  It seemed from previous posts on this topic that stability was the prime concern for not upgrading the default to 2.8.0 earlier, people trust things on their UPSs working after all.

 

In the last few months people having problems have been increasingly offered the 2.8.0 flavour of the plugin bundled with the very Sotirov 2.8.0 RC3 (last stable release) package. That has since helped various users fix their problems and seems to be working well overall. I'm just asking, why not stick with the stable release 2.8.0 package that you've already offered to some of your users to fix existing problems and then maybe custom-build the next version for everyone (2.8.1 being around the corner)?

 

It just doesn't make sense from a point of continuity to me to keep users on 2.7.4 for years for sake of stability, then offer a portion of them a 2.8.0 RC3 stable bundle as a band-aid but then not switch the rest over to that stable version when everything seems to work, but instead a 2 days old experimental build which like 3 people have tested so far.

 

 

44 minutes ago, ich777 said:

I would also recommend that you take a look at the old 2.7.4 package and where things are located, this package was basically built by Slackware and I stick to the Slackware conventions at least in terms how things are built and I can customize them for Unraid but in this case I didn't do it because it is a default package.

 

I couldn't find anything "built by Slackware", oldest 2.7.4 packages I could find in the repository were built by V'yacheslav Stetskevych according to the build scripts (maybe he's with Slackware?...)

 

44 minutes ago, ich777 said:

May I ask why it should be more unstable if I build it with the same libraries that are used on Unraid? This is a bit confusing for me, there are only two things that could happen:

  • It is working
  • It is not working

 

Well people are kind of trusting their hardware on their UPS and NUT functioning. So I do think as much careful package stability consideration and testing as possible should go into things working right from the release.

 

But I'll not pursue this further, we'll have to agree to disagree here. I have the utmost respect for all the work done here and I'll continue to contribute my part but I'm one of those people who think that not doing everything in-house has it's benefits too. 🙂

Link to comment
17 minutes ago, Rysz said:

NUT 2.8.0 RC3 has been released 04-2022, it's already 07-2023. The plugin has been bundling a 7 year old release (built as a package last 3 years ago) as it's default package until now.  It seemed from previous posts on this topic that stability was the prime concern for not upgrading the default to 2.8.0 earlier, people trust things on their UPSs working after all.

People who are currently testing it have no issues whatsoever or am I wrong?

 

18 minutes ago, Rysz said:

In the last few months people having problems have been increasingly offered the 2.8.0 flavour of the plugin bundled with the very Sotirov 2.8.0 RC3 (last stable release) package. That has since helped various users fix their problems and seems to be working well overall. I'm just asking, why not stick with the stable release 2.8.0 package that you've already offered to some of your users to fix existing problems and then maybe custom-build the next version for everyone (2.8.1 being around the corner)?

I'm not quite following here I think...

I could of course build the RC3 too but I'm really not too sure if I want to do that since it's an RC release, another possibility would be to build form the latest stable but that is something I consider a nightly build.

I really don't get your concerns here, don't get me wrong but you could always use another build or that one that you are comfortable with since you are capable of modifying it. ;)

 

22 minutes ago, Rysz said:

but instead a 2 days old experimental build which like 3 people have tested so far.

I'm really not following anymore, this build is not experimental, why do you think it's experimental? 😕

 

23 minutes ago, Rysz said:

I couldn't find anything "built by Slackware", oldest 2.7.4 packages I could find in the repository were built by V'yacheslav Stetskevych according to the build scripts (maybe he's with Slackware?...)

Please search the source: https://slackbuilds.org/repository/15.0/system/nut/

 

27 minutes ago, Rysz said:

So I do think as much careful package stability consideration and testing as possible should go into things working right from the release.

Did you have any confirmation that the package from the other source is stable and works for everyone? Just saying.

 

24 minutes ago, Rysz said:

But I'll not pursue this further, we'll have to agree to disagree here.

Completely agreed on that point... :D

 

25 minutes ago, Rysz said:

but I'm one of those people who think that not doing everything in-house has it's benefits too. 🙂

Sure, but Unraid is also not fully Slackware since Tom builds many packages for Unraid also from source, I hope now that makes more sense to you.

 

See, this is also one of the issues from Open Source development and I fear in every project since you can not make everybody happy and some people will walk away, rant about certain things and so on and in some cases some Open Source projects will go down <- but this is a whole other story.

But at least we can work together and fix things, help each other if an issue appears. :D

 

This will be my last post about the NUT package since I really don't know what else to say.

Link to comment
On 7/26/2023 at 8:42 PM, SimonF said:

ich777 has compiled a new version of the package, it may be work installing to see if that fixes the USB errors.

 

Stop nut from the settings, copy the attached file to /boot/config/plugins/nut/

 

Then change dir, remove old package, check command is missing and then load new package.

 

You can now restart nut

 

root@computenode:~# cd /var/log/packages
root@computenode:/var/log/packages# removepkg nut-2.8.0-x86_64-1 
Removing package: nut-2.8.0-x86_64-1
+  lots of lines

Check commands are gone

root@computenode:/var/log/packages# upsc
bash: upsc: command not found
root@computenode:/var/log/packages# 

Install package

root@computenode:/var/log/packages# installpkg /boot/config/plugins/nut/nut-2.8.0-x86_64-1.txz 
Verifying package nut-2.8.0-x86_64-1.txz.
Installing package nut-2.8.0-x86_64-1.txz:
PACKAGE DESCRIPTION:
# nut (Network UPS Tools)
#
# The Network UPS Tools is a collection of programs which provide a
# common interface for monitoring and administering UPS hardware.
# It uses a layered apporoach to connect all the components. Drivers
# are provided for a wide assortment of equipment. The primary goal of
# the NUT project is to provide reliable monitoring of UPS hardware
# and ensure safe shutdowns of the systems which are connected.
#
# Homepage: http://www.networkupstools.org
#
Executing install script for nut-2.8.0-x86_64-1.txz.
Package nut-2.8.0-x86_64-1.txz installed.
root@computenode:/var/log/packages# 

 

 

@secretstorageYou may want to try the above also.

 

I plan to replace the current package with this version, so anyone else using 2.8.0 able test please do so.

 

 

@cassiusdrowWould you be able to test new package for me also?

nut-2.8.0-x86_64-1.txz 831.42 kB · 16 downloads

 

Please note this when following these instructions to test the new 2.8.0 package. Unless you're also changing the MD5 in the plugin definition file to the MD5 of the new package, the new package will not survive your system rebooting. You'll be thinking you're testing the new package when you're actually right back on the old package. The MD5 mismatching will make UNRAID pull the old 2.8.0 package from the GitHub repository once the system boots. Just sayin' ;-)

Link to comment
1 hour ago, Rysz said:

 

Please note this when following these instructions to test the new 2.8.0 package. Unless you're also changing the MD5 in the plugin definition file to the MD5 of the new package, the new package will not survive your system rebooting. You'll be thinking you're testing the new package when you're actually right back on the old package. The MD5 mismatching will make UNRAID pull the old 2.8.0 package from the GitHub repository once the system boots. Just sayin' ;-)

Yes this was just asking a few to test, it was not planned as a perm install until I move plg to 2.8. Also will need a new package when libssl1.1 becomes EOS!

  • Like 1
Link to comment

still getting tons and tons of 
Jul 30 16:12:12 unraid usbhid-ups[25328]: nut_libusb_get_string: Pipe error. Jul 30 16:12:44 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:13:50 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:16:00 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:19:15 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:20:19 unraid usbhid-ups[25328]: nut_libusb_get_string: Pipe error.

everything works fine but it is taking up huge chunks of my logs, any way to disable to message or a solution to make them go away entirely? i've uploaded diagnostics if that helps

edit: i also get alot of 
Jul 29 21:25:13 unraid upsmon[25356]: Poll UPS [[email protected]] failed - Data stale Jul 29 21:25:15 unraid upsd[25352]: UPS [ups] data is no longer stale Jul 29 21:25:18 unraid upsmon[25356]: Communications with UPS [email protected] established if that's of any relation

unraid-diagnostics-20230730-1624.zip

 

nut-diagnostics.dev

Edited by jcofer555
additional info
Link to comment
15 hours ago, jcofer555 said:

still getting tons and tons of 
Jul 30 16:12:12 unraid usbhid-ups[25328]: nut_libusb_get_string: Pipe error. Jul 30 16:12:44 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:13:50 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:16:00 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:19:15 unraid usbhid-ups[25328]: nut_libusb_get_report: Input/Output Error. Jul 30 16:20:19 unraid usbhid-ups[25328]: nut_libusb_get_string: Pipe error.

everything works fine but it is taking up huge chunks of my logs, any way to disable to message or a solution to make them go away entirely? i've uploaded diagnostics if that helps

edit: i also get alot of 
Jul 29 21:25:13 unraid upsmon[25356]: Poll UPS [[email protected]] failed - Data stale Jul 29 21:25:15 unraid upsd[25352]: UPS [ups] data is no longer stale Jul 29 21:25:18 unraid upsmon[25356]: Communications with UPS [email protected] established if that's of any relation

unraid-diagnostics-20230730-1624.zip 153.96 kB · 1 download

 

nut-diagnostics.dev 957 B · 2 downloads

Maybe try 2.8.0 package.If you have any manual configs take a copy.

Please uninstall the plugin, ideally restart the server, manually install 2.8.0 version:

https://raw.githubusercontent.com/SimonFair/NUT-unRAID/master/plugin/nut-2.8.0.plg

Link to comment

My UPS model is BK650M2, When I upgraded to version 6.11.5, the plugin was running normally and there were no errors in the logs. However, after upgrading to 6.12.3, the old version of the plugin became unusable and I used the new version of "Network UPS Tools". Since then, it has been continuously reporting errors and a large number of warning messages have appeared in the logs. Recently, after upgrading to the latest version 2.8.0 of "Network UPS Tools", the UPS has started to lose connection and must be manually reloaded The 'Network UPS Tools' can only be reconnected after a period of time, but the connection will still be lost. I tried uninstalling and reinstalling' Network UPS Tools', but after a night, it did not disconnect again, but warning messages kept appearing again.

 

This is a warning message after disconnecting

iShot_2023-08-01_12_01_43.thumb.png.1d2e8096f971d0e0d9f44985f1382470.png

This is a constantly occurring warning message

iShot_2023-08-01_12_03_35.thumb.png.2a7584420db9b9a92c125ff20465b67e.png

This is the plugin's settings page

iShot_2023-08-01_12_05_37.thumb.png.c73c8f15378bd6f5eac465923f815adf.png

Edited by song
Link to comment
2 hours ago, song said:

My UPS model is BK650M2, When I upgraded to version 6.11.5, the plugin was running normally and there were no errors in the logs. However, after upgrading to 6.12.3, the old version of the plugin became unusable and I used the new version of "Network UPS Tools". Since then, it has been continuously reporting errors and a large number of warning messages have appeared in the logs. Recently, after upgrading to the latest version 2.8.0 of "Network UPS Tools", the UPS has started to lose connection and must be manually reloaded The 'Network UPS Tools' can only be reconnected after a period of time, but the connection will still be lost. I tried uninstalling and reinstalling' Network UPS Tools', but after a night, it did not disconnect again, but warning messages kept appearing again.

 

This is a warning message after disconnecting

iShot_2023-08-01_12_01_43.thumb.png.1d2e8096f971d0e0d9f44985f1382470.png

This is a constantly occurring warning message

iShot_2023-08-01_12_03_35.thumb.png.2a7584420db9b9a92c125ff20465b67e.png

This is the plugin's settings page

iShot_2023-08-01_12_05_37.thumb.png.c73c8f15378bd6f5eac465923f815adf.png

Do you need to be running as a netserver, do you have other servers attaching to this server? Have you tried as standalone?

Link to comment
2 hours ago, SimonF said:

Didn't work at all or do you mean you still get the errors?

it worked but the errors still spamming, and yes i need netserver because i have another unraid machine using the ups as well however i have tried it standalone and the errors are there as well, no difference from when i use netserver

Link to comment

Hello everyone,

 

I´ve setup NUT to run on my unRAID and send Notifications out to my QNAP and some other devices like my PC.

NUT sometimes reports that the UPS has lost its Power and spams my Mail and QNAP with this notification even though no Power loss happened. My UPS is an APC Smart UPS-C 1000VA connected via USB to the unRAID. I am also monitoring it in Home Assistant and I do see that the UPS was not available at this moment. Is NUT crashing at this moment or what is happening there? Is my UPS shady?

 

Thanks for your Support, Time and creation of this beautiful Monitoring Tool in unRAID.

Link to comment
8 hours ago, jcofer555 said:

it worked but the errors still spamming, and yes i need netserver because i have another unraid machine using the ups as well however i have tried it standalone and the errors are there as well, no difference from when i use netserver

I dont have a usbhid-ups so not sure if these are relavent.

 

interruptonly

If this flag is set, the driver will not poll UPS. This also implies using of INPUT flagged objects. Some Powercom units need this option.

interruptsize=num

Limit the number of bytes to read from interrupt pipe. For some Powercom units this option should be equal to 8.

 

https://networkupstools.org/docs/man/usbhid-ups.html

Link to comment
16 minutes ago, EdwinT said:

Hello everyone,

 

I´ve setup NUT to run on my unRAID and send Notifications out to my QNAP and some other devices like my PC.

NUT sometimes reports that the UPS has lost its Power and spams my Mail and QNAP with this notification even though no Power loss happened. My UPS is an APC Smart UPS-C 1000VA connected via USB to the unRAID. I am also monitoring it in Home Assistant and I do see that the UPS was not available at this moment. Is NUT crashing at this moment or what is happening there? Is my UPS shady?

 

Thanks for your Support, Time and creation of this beautiful Monitoring Tool in unRAID.

Can you post system log?

Link to comment
19 minutes ago, SimonF said:

Can you post system log?

Here is a snippet of the Log. This is where it happened in the morning:

Aug  1 10:57:41 EddysUnraid upsmon[28043]: UPS [email protected] on battery
Aug  1 10:57:41 EddysUnraid sSMTP[13583]: Creating SSL connection to host
Aug  1 10:57:41 EddysUnraid sSMTP[13583]: SSL connection using TLS_AES_256_GCM_SHA384
Aug  1 10:57:43 EddysUnraid sSMTP[13583]: Sent mail for [email protected] (221 2.0.0 closing connection y11-20020aa7d50b000000b0051df67eaf62sm6669127edq.42 - gsmtp) uid=0 username=root outbytes=694
Aug  1 10:57:46 EddysUnraid upsmon[28043]: UPS [email protected] on line power

and here from a few mins ago:

Aug  1 19:48:12 EddysUnraid upsmon[8415]: UPS [email protected] on battery
Aug  1 19:48:12 EddysUnraid sSMTP[8950]: Creating SSL connection to host
Aug  1 19:48:12 EddysUnraid sSMTP[8950]: SSL connection using TLS_AES_256_GCM_SHA384
Aug  1 19:48:14 EddysUnraid sSMTP[8950]: Sent mail for [email protected] (221 2.0.0 closing connection t10-20020a17090616ca00b0098d486d2bdfsm8000720ejd.177 - gsmtp) uid=0 username=root outbytes=694
Aug  1 19:48:17 EddysUnraid upsmon[8415]: UPS [email protected] on line power

 

Link to comment
1 hour ago, EdwinT said:

Here is a snippet of the Log. This is where it happened in the morning:

Aug  1 10:57:41 EddysUnraid upsmon[28043]: UPS [email protected] on battery
Aug  1 10:57:41 EddysUnraid sSMTP[13583]: Creating SSL connection to host
Aug  1 10:57:41 EddysUnraid sSMTP[13583]: SSL connection using TLS_AES_256_GCM_SHA384
Aug  1 10:57:43 EddysUnraid sSMTP[13583]: Sent mail for [email protected] (221 2.0.0 closing connection y11-20020aa7d50b000000b0051df67eaf62sm6669127edq.42 - gsmtp) uid=0 username=root outbytes=694
Aug  1 10:57:46 EddysUnraid upsmon[28043]: UPS [email protected] on line power

and here from a few mins ago:

Aug  1 19:48:12 EddysUnraid upsmon[8415]: UPS [email protected] on battery
Aug  1 19:48:12 EddysUnraid sSMTP[8950]: Creating SSL connection to host
Aug  1 19:48:12 EddysUnraid sSMTP[8950]: SSL connection using TLS_AES_256_GCM_SHA384
Aug  1 19:48:14 EddysUnraid sSMTP[8950]: Sent mail for [email protected] (221 2.0.0 closing connection t10-20020a17090616ca00b0098d486d2bdfsm8000720ejd.177 - gsmtp) uid=0 username=root outbytes=694
Aug  1 19:48:17 EddysUnraid upsmon[8415]: UPS [email protected] on line power

 

Does seem to look like the ups is going onto battery and then returning back to line power. I guess you have check connections etc.

 

Maybe someone who has an APC maybe able to advise.

Link to comment
2 hours ago, SimonF said:

I dont have a usbhid-ups so not sure if these are relavent.

 

interruptonly

If this flag is set, the driver will not poll UPS. This also implies using of INPUT flagged objects. Some Powercom units need this option.

interruptsize=num

Limit the number of bytes to read from interrupt pipe. For some Powercom units this option should be equal to 8.

 

https://networkupstools.org/docs/man/usbhid-ups.html

i'll give it a try. weired thing is exact same ups when on my last unraid server which was a r720xd i had no errors at all, moved the ups to my new server and now the errors come. same exact config as i pulled the hard drives and flash and just booted up the new server

Link to comment
On 7/29/2023 at 10:01 AM, SimonF said:

Could someone provide me details of their SNMP config in nut? Do you use the SNMP plugin also?

I use the NUT plugin in manual config mode.  I do not use the SNMP plugin.

 

The only part of the NUT configuration that is specific to SNMP is the UPS driver in ups.conf:

 

[ups]
driver = snmp-ups
desc = "APC Smart-UPS SMT1000RM2U"
port = 192.168.1.13
community = private
snmp_version = v1
snmp_timeout = 5
pollfreq = 15

 

Is there something else you were looking for?

Link to comment
11 hours ago, jcofer555 said:

i'll give it a try. weired thing is exact same ups when on my last unraid server which was a r720xd i had no errors at all, moved the ups to my new server and now the errors come. same exact config as i pulled the hard drives and flash and just booted up the new server

 

Might be the USB interface (of the motherboard) then. Could be worth trying a PCIe USB expansion card if it bothers you much.

Link to comment
32 minutes ago, Rysz said:

 

Might be the USB interface (of the motherboard) then. Could be worth trying a PCIe USB expansion card if it bothers you much.

i have no pcie slots left sadly or i'd try that. it fills the logs up severly so i have to scroll pages and pages to actually check my logs so i can't keep it going that way. i'll just have to use the built in apc plugin which works fine with no errors just doesn't have the toolbar giving me the details in green which i really like from this plugin

Link to comment

I am having a problem with the Turn off UPS after shutdown setting with a usbhid-ups driver in standalone mode. I have tested running upscmd ups load.off.delay 20 in the web terminal and that works so I know the USB shutdown command works it is just not being run on shutdown. It looks like at shutdown it is unmounting the folders before the shutdown command can be run. 

 

Unmounting local file systems:
...
/usr: successfully unmounted
...
Restarting udev to be able to shut the UPS inverter off...
/etc/rc.d/rc.nut: line 277: /etc/rc.d/rc.udev: No such file or directory
Shutting down UPS driver...
/etc/rc.d/rc.nut: line 240: /usr/sbin/upsdrvctl: No such file or directory
reboot: Power down

 

Link to comment
2 hours ago, ur136261 said:

I am having a problem with the Turn off UPS after shutdown setting with a usbhid-ups driver in standalone mode. I have tested running upscmd ups load.off.delay 20 in the web terminal and that works so I know the USB shutdown command works it is just not being run on shutdown. It looks like at shutdown it is unmounting the folders before the shutdown command can be run. 

 

Unmounting local file systems:
...
/usr: successfully unmounted
...
Restarting udev to be able to shut the UPS inverter off...
/etc/rc.d/rc.nut: line 277: /etc/rc.d/rc.udev: No such file or directory
Shutting down UPS driver...
/etc/rc.d/rc.nut: line 240: /usr/sbin/upsdrvctl: No such file or directory
reboot: Power down

 

There is a fix in 6.12.4 when released for this not a nut issue

Link to comment
  • Rysz featured this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.