UPS service starts then immediately turns off

Hidyman

Dabbler
Joined
Mar 22, 2017
Messages
10
I had a power outage and my TrueNAS box had an unexpected shutdown instead of being shut down when the ups went on battery. I went to check the config and when I went back to the services page, the service was off. It is set to start automatically, btw. I get the correct info when I check upsc and the UPS reporting graph shows correct information, but when I turn on the service, (if some status has changed it will send an email), it then shut itself back off. I have it set to turn off 30 seconds after it goes on battery, but by the time it gets to that point the service is turned off and it wont shut down. This hardware and config was working on FreeNAS before I migrated to TrueNAS Scale, don't know if that helps. Currently running TrueNAS Scale 22.02.2
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
I had a power outage and my TrueNAS box had an unexpected shutdown instead of being shut down when the ups went on battery. I went to check the config and when I went back to the services page, the service was off. It is set to start automatically, btw. I get the correct info when I check upsc and the UPS reporting graph shows correct information, but when I turn on the service, (if some status has changed it will send an email), it then shut itself back off. I have it set to turn off 30 seconds after it goes on battery, but by the time it gets to that point the service is turned off and it wont shut down. This hardware and config was working on FreeNAS before I migrated to TrueNAS Scale, don't know if that helps. Currently running TrueNAS Scale 22.02.2
Please "report a bug" and help with diagnostics and resolution.
 

Hidyman

Dabbler
Joined
Mar 22, 2017
Messages
10
For future reference, if you have set a shutdown command "/sbin/shutdown -p now" when using TrueNAS Core/FreeNAS (FreeBSD based) this command will not work for TrueNAS Scale after migration . You need to remove the command or change to "/sbin/shutdown -P now" or it will hang the UPS service. Note the capital letter P.
Thanks to Muhammad Rehan at iXsystems for diagnosing this issue.
 

microx007

Cadet
Joined
Nov 15, 2023
Messages
1
hello,
same problem here, any solving to this problem?
i use TrueNAS-13.0-U5.3, and the ups is Legrand.
ssh response when send "upsc" command:
</
battery.charge: 100
battery.voltage: 27.00
battery.voltage.high: 26.00
battery.voltage.low: 20.80
battery.voltage.nominal: 24.0
device.mfr: Legrand
device.model: SPE 1000VA
device.type: ups
driver.name: nutdrv_qx
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: Megatec 0.06
driver.version.internal: 0.28
input.current.nominal: 4.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 236.7
input.voltage.fault: 236.7
input.voltage.nominal: 230
output.voltage: 237.0
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: S00E14
ups.load: 16
ups.productid: 5161
ups.status: FSD OL
ups.temperature: 27.5
ups.type: offline / line interactive
ups.vendorid: 0665
/>

after i start the ups service from truenas web GUI, i get this message in ssh terminal:
</
Broadcast Message from root@NAS.local
(no tty) at 10:00 EET...

Executing automatic power-fail shutdown
/>
no problem with power cut at that moment.
The nas is not shuting down, and i receive 2 email from ups reporting service with this message:
email1:"notification 'shutdown'
UPS:'ups'
Statistics recovered:
1)Battery charge (percent)
battery.charge: 100"
email2:
notification 'FSD'
UPS:'ups'
Statistics recovered:
1)Battery charge (percent)
battery.charge: 100"
 
Top