Beta test of new NUT UPS package
-
Do you still have maxretry and retrydelay in the advanced section?
https://forum.pfsense.org/index.php?topic=114871.msg640123#msg640123
You should be seeing a stream of messages from the snmp driver…
@w0w:
If I unplug SNMP card from the network and then restart the service — it does not reconnects to the UPS. All I get in logs is
endless.... Aug 2 10:22:46 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:41 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:36 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:31 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:26 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:21 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:16 upsmon 50160 Poll UPS [SMK-1000A] failed - Driver not connected Aug 2 10:22:11 upsmon 50160 UPS SMK-1000A is unavailable
-
Double checked my setup and config and found that I am an idiot.
maxretry=60
retrydelay=60
was placed into upsmon.conf instead of ups.conf
I have removed both ampersand and sleep from nut.sh
Testing again -
Looks like all working without ampersand and sleep.
But when ampersand removed it takes a while to load status page with disconnected UPS ;).
So I ask you again, is it OK for you if sleep would be 12 seconds instead of 1?
With this value all seems OK on my side. Reconnection after SNMP down and service restart with SNMP online on status page is OK. No issues currently! -
I really can't do a 12 second sleep in service start. The 95% case is that UPS startup takes well under 1 second. An additional delay in service start affects everyone and everything including system startup (boot). Introducing a 10+ second delay to system startup would not be generally acceptable. It also creates a situation in which there can be multiple service starts underway at the same time, which can result in all sorts of problems with nut. And of course, 12 seconds works in this specific case, but what happens when a case comes along that requires 20 seconds for UPS initialization?
The backgrounding for driver start is required to support initialization retries. Without backgrounding, status page load (and system startup) will hang until driver initilization completes. With the maxretry/retrydelay example previously posted, this could be 1 hour. Note that maxretry/retrydelay only affects driver initialization (startup). It does not affect disconnect/reconnect.
About the only thing I can do is have the status be "pending" like what is shown in the widget following system boot.
-
I sent out a beta 6 version to everyone. The only change is the ups “pending” change discussed above. To avoid any confusion, please delete the prior version via pkg delete prior to installing the new version.
If you have time to give this version a test, I would really appreciate it. I'd like to put this to bed. Thanks!
-
Aug 3 07:11:33 pkg pfSense-pkg-nut-2.7.4b6 installed Aug 3 07:11:33 php /etc/rc.packages: Successfully installed package: nut. Aug 3 07:11:33 check_reload_status Syncing firewall Aug 3 07:11:29 php /etc/rc.packages: Starting service nut Aug 3 07:11:29 check_reload_status Syncing firewall Aug 3 07:11:28 php /etc/rc.packages: Beginning package installation for nut . Aug 3 07:11:28 pkg nut-2.7.4 installed Aug 3 07:11:18 pkg nut-2.7.4 deinstalled
But… NUT service itself does not start automatically after installation. Only on saving config or reboot.
-
@w0w:
But… NUT service itself does not start automatically after installation. Only on saving config or reboot.
This is expected: https://forum.pfsense.org/index.php?topic=114871.msg643281#msg643281
-
Ok then. It works.
-
dennypage
Thank you for reload page script also ;) Some days before I have tried similar one also but without success. -
dennypage
Connected fine to my APC UPS over SNMP.
It even picked up the config and converted it.
The old package had all of the SNMP settings broken out so you could just fill it in.
It looks like the only one really needed anymore is the community string.
Might be more friendly to have a setting for it or a note in the extra arguments.All working fine for me though, but it did take a second to look for UPS instead of NUT in the services list. :)
-
-
Thanks timotl, I'm glad it worked for you. I reason I didn't put the community string as a primary part of the config is because it is optional to the driver and the majority of folk leave this as the default value (public). I'll add a note to the doc thread in the forum to make sure people know. Thanks again for your help with testing!
-
I sent out a beta 6 version to everyone. The only change is the ups “pending” change discussed above. To avoid any confusion, please delete the prior version via pkg delete prior to installing the new version.
If you have time to give this version a test, I would really appreciate it. I'd like to put this to bed. Thanks!
Beta 6 working fine here.
-
Thanks Starrbuck, much appreciated.
-
The new NUT package has been merged. This version is identified as 2.7.4_1, and is equivalent to beta version 6. When the package becomes available via the package manager, I recommend that you delete the beta version prior to installing the production version.
Again, thank you for the help guys. It is greatly appreciated!
-
Thank you, sir! It was fun.
-
Hello All,
Thank you for the work on this.
After installing the new version, I no longer see it listed in the services menu (neither NUT nor UPS). I tried the install on two different pfSense FW's running 2.3.2 (pfsense amd64 and nanobsd) and right now it doesn't work on either box.
When I do a full reinstall it says this:
Upgrading pfSense-pkg-nut…
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):Installed packages to be REINSTALLED:
pfSense-pkg-nut-2.7.4_1 [pfSense]Number of packages to be reinstalled: 1
[1/1] Reinstalling pfSense-pkg-nut-2.7.4_1…
[1/1] Extracting pfSense-pkg-nut-2.7.4_1: …....... done
The nut package is not installed.Deletion aborted.XML error: PKGINFOLINK at line 8 cannot occur more than once
Cleaning up cache... done.
SuccessI tried a full uninstall and reinstall but the service is nowhere to be found. It shows that the package is installed, I just can't do anything besides that. Any ideas?
Thanks,
-th3r3isnospoon
-
I am also seeing this error on factory, but not on beta. I don't have a community version at the moment to check on. Which version are you running? Community, factory, or beta?
-
If it helps, I tried to update from beta and see the same error on community.
Removed the package manually and still has the same error on install. -
I am also seeing this error on factory, but not on beta. I don't have a community version at the moment to check on. Which version are you running? Community, factory, or beta?
Using the Community edition.
Thanks,
-th3r3isnospoon