udobec
Goto Top

Server 2008 R2 und Diskstation DS416play gleichzeitig an APC Smart UPS 750 betreiben

Hallo,
der o.g. Server 2008R2 ist mit der Smart USV über die serielle Schnittstelle verbunden. Powerchute Business erkannte diesen immer ohne Probleme. Nun wollte ich gleichzeitig eine Synology NAS Diskstation DS416play über den USB Port an die USV anschließen. Dies funktioniert. USV wird von der Diksstation erkannt. Leider bekomme ich nun von der seriellen Verbindung Server 2008R2>USV die Fehlermeldung: Communication lost. Was ist zu tun, wenn ich sowohl den Server, als auch die nasbox gleichzeitig an der usv betreiben will? Ist die überhaupt möglich? Falls nicht, welche USV kann mit der DS416play betrieben werden. Ich habe mit Produkten von APC gute Erfahrungen gesammelt.
Danke.

Content-Key: 345197

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

Ausgedruckt am: 28.03.2024 um 13:03 Uhr

Mitglied: Looser27
Lösung Looser27 02.08.2017 aktualisiert um 13:58:47 Uhr
Goto Top
Hallo,

wenn die USV das kann, Netzwerkkarte (Network Management Card von APC) nachrüsten und beide Geräte über LAN mit der USV kommunizieren lassen.

Gruß

Looser
Mitglied: udobec
udobec 02.08.2017 um 14:06:59 Uhr
Goto Top
Hallo,
in die Richtung habe ich mir das schon gedacht. Kann aber die USV nicht und ist zu teuer.
Danke nochmals.
Mitglied: em-pie
em-pie 02.08.2017 um 14:44:28 Uhr
Goto Top
Moin,

du könntest einen Workaround via Batch erstellen:

Via PowerChute kann man ja je nach Event Scripte ausführen lassen.
Lasse doch einfach ein Script laufen, welches sich via SSH zur DS416play verbindet und dann das shutdown-Command ausführt:
https://forum.synology.com/enu/viewtopic.php?t=89053

Bedenke aber, dass die im Batch-Script hinterlegten Credentials nicht verschlüsselt sind.

Du könntest ja mal schauen, ob man sich mittels Zertifikaten an der DS416play verbinden kann....

Alternativ einen RaspberryPi an die USV hängen und der fährt dann den Server und das NAS herunter!?

Gruß
em-pie
Mitglied: udobec
udobec 02.08.2017 um 15:41:44 Uhr
Goto Top
Interessant. Ich werde mich damit befassen.
Danke.
Mitglied: udobec
udobec 02.08.2017 um 16:34:22 Uhr
Goto Top
Hallo,

ich habe jetzt putty auf dem server installiert und den ssh dienst auf der diskstation aktiviert. Zugriff klappt als admin. Weiß jemand, ob es reicht, als admin angemeldet zu sein oder muss man vollberechtigung (root) haben? falls dies der fall sein sollte, könnte es probleme mit dem zugriff auf die neue version des diskmanagers dsm 6 geben. frage dann: dauerhaft als root anmelden bzw. passwort für root erstellen?
Danke.
Mitglied: udobec
udobec 02.08.2017 um 17:13:11 Uhr
Goto Top
@em-pie

Ich ha jetzt die Berechtigungen so setzen können, dass der admin automatisch root rechte auf der Diskstation hat, sobald er sich einloggt. Frage: Wie bzw. in welcher Form muss ich das Kommando hier: C:\Putty\plink.exe -ssh -pw test root@192.168.1.1 poweroff
(angepasst für meine Umgebung) abspeichern, damit ich es in Powerchute einbinden kann bzw. Powerchute etwas damit anfangen kann?
Danke.
Mitglied: em-pie
em-pie 02.08.2017 aktualisiert um 17:23:58 Uhr
Goto Top
Mitglied: udobec
udobec 02.08.2017 um 17:49:23 Uhr
Goto Top
Danke.

script läuft und ich kannes auch in powerchute eintragen. Problem: wenn das ganze abgearbeitet wird, kommt in der konsole die fehlermeldung: you have to be root. jetzt ist die frage, wie man auf der diskstation dem benutzer das paawort zuweist, falls das möglich ist, oder?
Mitglied: udobec
udobec 03.08.2017 um 11:33:59 Uhr
Goto Top
@em-pie:
Das Skript an sich läuft, wenn ich es manuell von seinem Speicherort aufrufe:
Skript: C:\plink.exe -ssh -pw passwortdiskstation root@192.168.8.6 poweroff
Wenn ich es in Powerchute einbinde und von dort testen will, tut sich nichts.

Die cmdfiles werden hier C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles abgelegt. Dort ist auch das Skript drin. Muss ich an dem plink.exe noch was "verändern"?
Danke.
Mitglied: em-pie
em-pie 03.08.2017 um 12:00:56 Uhr
Goto Top
Folgende vermutung:
Powerchute kommt mit den ganzen Parametern/ Leerzeichen im aufzurufenden Batch nicht klar...
Dann: Mit ein wenig googlen kommst du auf folgenden Link:
http://forums.apc.com/spaces/7/ups-management-devices-powerchute-softwa ...

Teste also mal folgendes:
Ein zweites script erstellen, welches per CALL dein jetziges Script aufruft...
PowerChute ruft dann das "neue" Script auf, welches dein eigentliches Script startet...
Mitglied: udobec
udobec 03.08.2017 um 13:46:40 Uhr
Goto Top
@em-pie:
Danke für den Tipp. hab ein kickoff cmd file erstellt und auch in den cmdfiles ordner von powerchute kopiert.
rufe ich das kickoff.cmd von der konsole aus auf, wird das eigentliche skript ausgeführt und die diskstation fährt runter. wenn ich versuche, aus powerchute heraus das kickoff.bat zu testen, passiert nichts.
Mitglied: udobec
udobec 03.08.2017 um 13:56:32 Uhr
Goto Top
p.s.:
Das hier habe ich noch gefunden:
muss da noch ein @start vor die Kommandozeile?
How to configure command files / scripts for use with PowerChute Business Edition

Product:
PowerChute Business Edition

Environment:
All support Windows OS

Solution:

Please follow these steps to properly configure the command file / script option within PowerChute Business Edition :

1. Create the .cmd or .bat file and insert it into the cmdfile folder of PowerChute Business Edition. The @start must be used if the command file is calling an executable file AKA .exe (see NOTE below). The syntax should look like the following example (using the proper directory and executable names of course):
@start "" "C:\testdir\ myfile.exe"
There have also been instances where multiple line command files do not properly execute. In this configuration, a single line command file should be used to call the subsequent multiple line command file.

NOTE: In earlier versions of Windows all services run in Session 0 along with applications. This situation poses a security risk. In Windows Vista, and later versions of Windows, the operating system isolates services in Session 0 and runs applications in other sessions. PowerChute Business Edition Agent is run in Session 0 so if a command file launches a .exe that .exe will be launched in Session 0 and not visible to the logged in users. To verify that the .exe has launched open Task Manager and review the list of Processes running. More information on Windows Session can be found at http://blogs.technet.com/b/askperf/archive/2007/04/27/application-compa ...
2. Set up configure shutdown and choose the command file from the dropdown list and hit the test button (if running PCBE version 7.04 or Agent version 9.1 and above). Events can also be configured to run from the web UI on the agent directly. This may not work properly if the agent is controlled by PCBE server and the web UI. We do not recommend used in the web UI and the server to configure the Agent/s version 9.0.2 and below.
3. If the test fails, go to Services and right click on the Agent service and choose Properties.
4. Click on the "Log On" tab.
5. Check the box for "Interact with Desktop". If the command file is executing commands to another computer, the local system account that the service runs as does not have the proper rights. In this case, the service should be set to log in as a user that does have rights on the secondary system. Please keep in mind also that passwords for the logged in account will not automatically change when the user's password changes for his account. The log in as account should be a user with a password that does not expire.
6. Stop the Agent service and restart it. Retest the command file through PowerChute.
7. If the command file is still not running, try a simple command file for a test. Create a directory directly on the C drive and for this test and call it apctest. The following single line in a command file will create a a file in the apctest named cmdtest.txt and the time that the file was run should be in the file:
time /T >> C:\apctest\cmdtest.txt
Mitglied: udobec
udobec 13.08.2017 um 09:12:25 Uhr
Goto Top
Moin,

bin immer noch mit der Sache beschäftigt. Ich habe diese "Lösung" gefunden.
Kenneth 4/26/2015 9:48 PM (in response to Polydore)
I'm late to this party, but I encountered the exact same problem and figured out a work-around: use the Windows Task Scheduler!

Create a task that executes whatever you'd like (I tested with shutdown /i), set a suitable user account for running it (I picked my user account) and check "Run with highest privileges" if necessary (not necessary for my test), and allow it to be started manually. Give the task a suitable name, e.g. ShutdownTest.
Create a script for PowerChute to execute, and add this line: @start schtasks /run /tn ShutdownTest
Execute it from PowerChute and watch it work ;)
Works perfectly, at least for me! cool
Mir ist nur noch nicht ganz klar, wie ich im Aufgabenplaner eine Aufgabe wie hier beschrieben anlegen kann. Ich habe keine Option gefunden, die dem "...and allow it to be started manually" im Deutschen entspricht. So wie ich es sehe, ergänzt man das eigentliche skript um die Zeile "@start schtasks /run /tn NameTask" oder reicht nur diese Zeile? Kann mir jemand auf die Sprünge helfen?
Danke.
Mitglied: udobec
udobec 13.08.2017 um 18:26:18 Uhr
Goto Top
Gelöst nach Kenneth´s Vorgabe. Danke.