APCUPSD shutdownscript not working

Sebastian Salmhofer

Renowned Member
Nov 11, 2012
20
2
68
Paraguay
Hi,

I've got a APC SmartUPS-1000 a few days ago to protect my Serverrack with 1 Fileserver and 1 Proxmox Host (2 in the furure).
At the first i tried to use nut, because its included in Openfiler which is my Filserver Distribution, but I didn't get it working.
I'm useing apcupsd on the Proxmox host now, and its almost working. I adapted the apccontrol to log onto the fileserver via ssh (as root) and do "shutdown -h 5" which is working, and then shutdown Proxmox with "shutdown -h now" or "/sbin/shutdown -h now" but both versions aren't working. If i type the cmd or start the script manualy it works, but if i simulate a power failure, it stops just the fileserver. I'm trying to get it working for a few days now, and i tryed everything i know.
I thing it could have something to do with permissions. I chrooted apsupsd with 4755, and i played around with sudo, but it didn't solved it. I'm not sure whitch user apcupsd is useing but i think root, because the "echo " | wall" messages are from root.

I hope someone can help and sorry for my english,
Sebastian
 
Isn't your problem as simple as exporting the key for root on the instance running the apcupsd master to your proxmox server (/root/.ssh/authorized_keys).
ssh-copy-id is your friend.
 
Ahh, I now understand your problem:cool:
See this: http://debian-resources.org/node/120/

The important part is this:
"Regarding the library error msgs, I encountered these too but realised I hadn’t edited /etc/apcupsd/apccontrol to ensure that /var & /usr are remounted ro prior to the shutdown."

But the changes needs to be done in this file: /etc/apcupsd/killpower
 
Last edited:
Thank's for the quick answer but I think that's not the problem, if I disconnect the UPS, my script shuts down the filserver via ssh and should do "shutdown -h now" on the local system. And that doesn't works. If i type "shutdown -h now" manualy after the script sent the schutdown cmd to the fileserver, everything else is working, so the ups stops after the system halt.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!