UPS service (nut): only works after manual restart
Description
Problem/Justification
Impact
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
Waqar Ahmed June 12, 2019 at 1:35 PM
I am closing it @Zamana, C. R. for now. Please refer to NUT and file an issue with them. If you have further reason to believe that we can improve some aspect of this, please feel free to comment here and we can re-open this. Thank you
Zamana, C. R. June 12, 2019 at 1:30 PM
Hi!
Thanks for reply.
Ok, I'll check again the issue you refer too. We have more data now, at least.
Regarding the "maxretry": Fatal error: 'maxretry' is not a valid variable name for this driver.
Thanks.
Regards.
Waqar Ahmed June 12, 2019 at 1:21 PM
auxiliary parameters can be added via UI ( services -> UPS -> auxiliary params ups.conf )
Waqar Ahmed June 12, 2019 at 1:20 PM
I think it is fair to assume this is a driver issue on NUT part.
See this https://alioth-lists.debian.net/pipermail/nut-upsuser/2015-August/009810.html.
And it also relates to the github issue comment i highlighted above in one of my comments.
I think you should post an issue with them. However as the problem seems to go away after a restart of solis driver ( service nut restart ), you can try setting "maxretry" option as an auxiliary parameter for ups.conf and set it to 2 or 3 perhaps and see if the issue persists ? ( https://networkupstools.org/docs/man/ups.conf.html - just for reference )
Looking forward to hearing from you!
Zamana, C. R. June 12, 2019 at 12:33 PM
Hello Ahmed.
I performed the procedure right now, but the conclusion is unclear to me. Here is my results so far:
I reached the step 6) with everything working, then I rebooted.
After the system started up, I received 2 e-mails from the system at the same time (08:49):
COMMBAD - ups
Then I ran the commands after the step 9):
root@freenas[~]# service nut_upsmon onestatus
nut_upsmon is running as pid 3147.
root@freenas[~]# /usr/local/libexec/nut/solis -DDD -a ups
Network UPS Tools - Microsol Solis UPS driver 0.65 (2.7.4)
0.000000 debug level is '3'
0.000537 getbaseinfo: sending CMD_UPSCONT and ENDCHAR to sync
1.128473 getbaseinfo: received -1 bytes from ser_get_buf_len()
1.128495 Solis not detected! aborting ...
Then I restarted the Netdata service, and the UPS service appeared in the monitoring screen.
After some minutes, at 08:58, I received another e-mail from the system, this time:
NOCOMM - ups
Then I ran the 2 commands again, and the last one kept running until I interrupted with CTRL-C:
root@freenas[~]# /usr/local/libexec/nut/solis -DDD -a ups
Network UPS Tools - Microsol Solis UPS driver 0.65 (2.7.4)
0.000000 debug level is '3'
0.000562 getbaseinfo: sending CMD_UPSCONT and ENDCHAR to sync
2.562842 getbaseinfo: received 25 bytes from ser_get_buf_len()
2.562866 CommReceive: RecPack: (25 bytes) => ba 6d 46 ae 00 06 e4 5d 02 06 0e 0a 10
2.562870 00 00 00 01 00 0b 65 09 60 60 cc fe
Detected Microsol Back-Ups BZ1200-BR on /dev/cuaU0
UPS Date 2003/06/11
System Date 2019/06/12 day of week Wed
UPS internal Time 10:14:06
Shutdown programming not activated
2.562910 getupdateinfo: requesting 25 bytes from ser_get_buf_len()
3.634653 getupdateinfo: received -1 bytes from ser_get_buf_len()
3.634765 dstate_init: sock /var/db/nut/solis-ups open on fd 5
3.634779 getupdateinfo: requesting 25 bytes from ser_get_buf_len()
4.674405 getupdateinfo: received -1 bytes from ser_get_buf_len()
5.637062 getupdateinfo: requesting 25 bytes from ser_get_buf_len()
5.762140 getupdateinfo: received 25 bytes from ser_get_buf_len()
5.762166 CommReceive: RecPack: (25 bytes) => ba 6c 46 ad 00 05 e4 60 02 09 0e 0a 10
5.762171 00 00 00 01 00 0b 65 09 60 60 cf fe
7.655462 getupdateinfo: requesting 25 bytes from ser_get_buf_len()
7.905693 getupdateinfo: received 25 bytes from ser_get_buf_len()
7.905706 CommReceive: RecPack: (25 bytes) => ba 6c 46 ad 00 06 e0 5e 02 0b 0e 0a 10
7.905710 00 00 00 01 00 0b 65 09 60 60 cc fe
9.695797 getupdateinfo: requesting 25 bytes from ser_get_buf_len()
10.049051 getupdateinfo: received 25 bytes from ser_get_buf_len()
10.049061 CommReceive: RecPack: (25 bytes) => ba 6c 46 ae 00 06 e4 5a 02 0d 0e 0a 10
10.049066 00 00 00 01 00 0b 65 09 60 60 cf fe
(...)
Right now (09:33), I didn't received any other e-mail, UPS is still showing in Netdata, and everything seems fine.
I have the Microsol Back-Ups BZ1200-BR on /dev/cuaU0. The communication with the UPS is only stablished after the restart of the nut service. I need to open a terminal and execute the command "service nut restart" from the command line in order to get the communication with the UPS stablished.