UPS is not powering off on command

any possibility that the user under which ups service is running can’t write this /etc/killpower file?

very interesting finding!!!

I ran the command:

upsdrvctl -d stop

then:

upsdrvctl -d start

another words, restarted the service

and then

upsdrvctl -d shutdown

and it worked!! the ups moved to “power loss state” for about 1 minute, and then powered off completely. Then powered on in 5-10 seconds itself because it detected input voltage, server started.

very strange

That indicates a problem with shutdown process. Maybe that checkbox to turn off power isn’t working? The killpower should be written by root so perms shouldn’t matter.

I actually don’t use the shutdown command, I run a script for shutdown instead of shutdown -h. May or may not make any difference. I have a bash script in the shutdown command box as I stop all apps myself and vms and a few others things I do, but the key line might be:

/usr/bin/cli -c 'system shutdown'

Try that in your shutdown command box and see if it makes any difference.

the shutdown process took a bit more time, but didn’t work either :confused:

I’m fighting this thing fifth day already :frowning:

Thanks everybody guys but looks like this is a major misconfiguration or incompatibility issue with my ups, don’t think that my model is kind of rare, though…

Unlike netxcloud/nginx/kubernetes war in truenas, I thought at least ups would work without issues but no.

I think this portion of the upsdrvctl isn’t running at all on shutdown

image

Because I can’t find “Waiting for UPS to cut the power” log entry in the syslog file or anywhere else

I can’t believe how much time and effort I spent on this thing

I’ve entered this command as if the system is at the end of shutdown proces:

root@TRUENAS[/etc/rc0.d]# service nut-server poweroff

and the error is the same:

Shutting down the UPS ...:Network UPS Tools - UPS driver controller 2.8.0
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Can't claim USB device [051d:0002]@0/0: Entity not found
Driver failed to start (exit status=1)
 Shutdown failed. Waiting for UPS batteries to run down.

So looks like truenas indeed sending command to power ups off but something is wrong in the driver itself

No, yours is not rare at all though it’s a mid support UPS. Still, should work. So, submit a bug report is my suggestion. It should work.

Used ticket option in truenas, any other way to let them hear my voice?

1 Like

No, unless one of them here happens to know and happens to respond. A ticket is what you want for sure. I’d love to follow the case if you can post a link. I want to know!

1 Like

No. This one should work “as expected”.

Granted, some of the cheap(er) UPS, do have bad USB implementations, but if the hardware is OK, this should work as expected.

Install from scratch on different hardware, and configure, test again with same UPS to see…

He did, with non Truenas hardware and it worked fine with NUT

I haven’t dug into the file system of my laptop as much as I did in Truenas Debian, because of what - damn UPS.

[NAS-130531] UPS isn’t powering off when truenas shutdown process is complete. - iXsystems TrueNAS Jira (atlassian.net)

I’ve explained them a lot more while uploading a debug file there.

1 Like

lol

Classic answer from the free software dev team:

Jira Ticket

:slight_smile:

They’re probably right about reaching out to NUT, Network UPS Tools authors or forum if they have one. IX mostly writes the UI, not the underlying software.

1 Like

No, they are completely wrong saying that every single device needs dedicated investigation, because there are tons of devices that use the same driver. They asked me to upload the debug file just to tell me that they have no resources to check.

They at least could test if this is a driver issue, wrapper issue, or OS misconfiguration. For me this would be valuable info to farther more easily resolve the problem.

same issue,
truenas shuts down, but not the ups

this was working in a earlier build of scale, cant say for sure what release.

power walker ups
using blazer_usb