firepower2k11
Goto Top

USV Slave unter Linux (Sophos UTM)

Hallo zusammen,

ich habe folgende Konstellation:

Synology NAS
USV Master, lässt Verbindungen von der Firewall IP zu
APC USV via USB angeschlossen

Sophos UTM 9.3 (Firewall)
USV Slave

Soweit habe ich alles eingerichtet, dass bei Stromausfall die USV so lange läuft, bis der Akku leer geht. Im kritischen Zustand (ca. 5%) fährt das NAS runter, die Sophos sollte auch herunterfahren.

Alles funktioniert, allerdings fährt die Sophos NUR herunter, wenn ich dort den upsd Dienst einmalig neustarte.

Hier mal die Befehle nacheinander ausgeführt, direkt nach frischem Start der Sophos:
root:/home/login # upsc ups
Error: Connection failure: Connection refused
root:/home/login # upsc -l
Error: Connection failure: Connection refused
root:/home/login # upsd
Network UPS Tools upsd 2.6.2
listening on 127.0.0.1 port 3493
Can't connect to UPS [ups] (dummy-ups-ups): Connection refused
root:/home/login # upsd
Network UPS Tools upsd 2.6.2
not listening on 127.0.0.1 port 3493
root:/home/login # upsc -l
ups
root:/home/login # upsc ups
Error: Driver not connected
root:/home/login # service upsd restart
Shutting down NUT UPS monitor done
Shutting down NUT UPS server done
Shutting down NUT UPS drivers done
Starting NUT UPS drivers done
Starting NUT UPS server startproc: exit status of parent of /usr/sbin/upsd: 1
done
Starting NUT UPS monitor done
root:/home/login # upsc ups
battery.charge: 7
[...USV Infos...]

Im system.log findet man auch erst einen Eintrag, nachdem der upsd Befehl via SSH ausgeführt wurde:
2015:01:31-23:22:41 root upsd[7925]: listening on 127.0.0.1 port 3493
2015:01:31-23:22:41 root upsd[7925]: Can't connect to UPS [ups] (dummy-ups-ups): Connection refused
2015:01:31-23:22:41 root upsd[7926]: Startup successful
2015:01:31-23:22:42 root upsd[7927]: not listening on 127.0.0.1 port 3493
2015:01:31-23:24:20 root upsd[8019]: not listening on 127.0.0.1 port 3493
2015:01:31-23:24:20 root upsmon[8022]: Startup successful
2015:01:31-23:24:20 root upsmon[8023]: UPS ups@192.168.1.99 battery is low
2015:01:31-23:24:21 root upsd[7926]: Connected to UPS [ups]: dummy-ups-ups


ups.conf:
#Verbindung öfters testen, Standard 1x
maxretry 5

[ups]
        driver = dummy-ups
        port = ups@192.168.1.99
        desc = "UPS"  

upsd.conf
LISTEN 127.0.0.1

upsd.users
[monuser]
        password = secret
        monuser slave

upsmon.conf
MONITOR ups@192.168.1.99 1 monuser secret slave

MINSUPPLIES 1

SHUTDOWNCMD "shutdown -h now"  

NOTIFYCMD /usr/local/bin/ups-notify

POLLFREQ 5

POLLFREQALERT 5

HOSTSYNC 15

DEADTIME 15

POWERDOWNFLAG /etc/killpower

NOTIFYMSG COMMOK "communication to UPS established"  
NOTIFYMSG COMMBAD "communication to UPS lost"  
NOTIFYMSG ONLINE "UPS running on line"  
NOTIFYMSG ONBATT "UPS running on battery"  
NOTIFYMSG SHUTDOWN "system will be shut down"  

NOTIFYFLAG COMMOK SYSLOG+EXEC
NOTIFYFLAG COMMBAD SYSLOG+EXEC
NOTIFYFLAG ONLINE SYSLOG+EXEC
NOTIFYFLAG ONBATT SYSLOG+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC

RBWARNTIME 43200

NOCOMMWARNTIME 300

FINALDELAY 5

Woran kann das liegen?
Nach Recherchen auf div. Linux / NUT Seiten habe ich den Wert "maxretry" auf 5 gesetzt, dieser ist standardmäßig 1. Dies half allerdings auch nicht.

Grüße,
firepower2k11

Content-Key: 261854

Url: https://administrator.de/contentid/261854

Printed on: April 19, 2024 at 01:04 o'clock