Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
80810members
346871posts

Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

Solved
ChrisInVT_apc
Ensign
Ensign
0 Likes
14
463

Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/10/2009


OK, this setup is taking years off my life due to the stress I'm encountering in trying to get it working properly.

We have a Smart-UPS 1500VA with two Windows 2003 servers and one Windows XP Pro server sucking power through it. One 2003 server is a DC, the other a NAS. The XP server is a Proxy and AntiVirus server. The DC is connected directly to the UPS VIA serial port. The Proxy & NAS are connected to the UPS's AP9607 Interface Expander VIA serial ports with the supplied cables. We are running PowerChute Business Edition Basic 7.0.2 build 110 (The software CD that came with the UPS) with the Agent/Server/Console on the DC. The Agent is also installed on the Proxy and NAS, along with the console on my desktop PC so I can administer everything without having to log into the DC.

In the Device list Configuration wizard, the Proxy & NAS are visible under Discovered Devices - but when added to Current Device List fail with the error +"Failed to apply the configuration profile to servername.domainname.local"+. therefor, I am unable to get the other two servers to gracefully shutdown. When we had a power failure several days ago, our DC gracefully shut down, but the Proxy & NAS went down hard. I've had problems with this happening in the past and resorted to using a command file to shut down the two servers over the network (since our backbone is on another UPS). Unfortunately, it seems that this took a hike also.

In the shutdown sequence, I have the Command File (ShutdownServers.cmd) to execute immediately and run for a duration of 1 minute. The command file works beautifully if ran; but PowerChute seems not to play nice with it. This is the contents of ShutdownServers.cmd:



-----
@echo off
for /f %%a in (c:\computers.txt) do call :shutdown %%a
goto :eof

:shutdown
echo Shutting down: %1
ping -n 1 -w 800 %1
if not errorlevel 1 goto MachineOK
echo Cannot ping machine %1. Aborting.
goto Fini

:MachineOK
shutdown.exe -s -f -m \\%1 -t 300 -D p:6:12 -c "A POWER FAILURE HAS BEEN DETECTED - SERVER SHUTDOWN INITIATED!"
Shutdown OK %1

:Fini
-----




I have a computers.txt file at the root of c: that has a list of the servers to shut down (this is handy because we have other computers on the network that are run of "dumb APCs" and this allows me to shut them down over the network also). In the services of the DC (which all this is running on) I have APC PBE Agent and APC PBE Server log on a domain administrator account (has full admin rights to EVERY computer on the network). I previously tried using Local System Account and having Allow service to interact with desktop, but that didn't work either. I have restarted the service every time I've made changes.


We are having this exact problem in multiple locations throughout the company, where PowerChute would gracefully shut down ALL servers - but it seems that the configuration took a hike on every single server (Windows Update anyone?)

Message was edited by: ChrisInVT


Accepted Solutions
ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/10/2009


OK, this setup is taking years off my life due to the stress I'm encountering in trying to get it working properly.

We have a Smart-UPS 1500VA with two Windows 2003 servers and one Windows XP Pro server sucking power through it. One 2003 server is a DC, the other a NAS. The XP server is a Proxy and AntiVirus server. The DC is connected directly to the UPS VIA serial port. The Proxy & NAS are connected to the UPS's AP9607 Interface Expander VIA serial ports with the supplied cables. We are running PowerChute Business Edition Basic 7.0.2 build 110 (The software CD that came with the UPS) with the Agent/Server/Console on the DC. The Agent is also installed on the Proxy and NAS, along with the console on my desktop PC so I can administer everything without having to log into the DC.

In the Device list Configuration wizard, the Proxy & NAS are visible under Discovered Devices - but when added to Current Device List fail with the error +"Failed to apply the configuration profile to servername.domainname.local"+. therefor, I am unable to get the other two servers to gracefully shutdown. When we had a power failure several days ago, our DC gracefully shut down, but the Proxy & NAS went down hard. I've had problems with this happening in the past and resorted to using a command file to shut down the two servers over the network (since our backbone is on another UPS). Unfortunately, it seems that this took a hike also.

In the shutdown sequence, I have the Command File (ShutdownServers.cmd) to execute immediately and run for a duration of 1 minute. The command file works beautifully if ran; but PowerChute seems not to play nice with it. This is the contents of ShutdownServers.cmd:



-----
@echo off
for /f %%a in (c:\computers.txt) do call :shutdown %%a
goto :eof

:shutdown
echo Shutting down: %1
ping -n 1 -w 800 %1
if not errorlevel 1 goto MachineOK
echo Cannot ping machine %1. Aborting.
goto Fini

:MachineOK
shutdown.exe -s -f -m \\%1 -t 300 -D p:6:12 -c "A POWER FAILURE HAS BEEN DETECTED - SERVER SHUTDOWN INITIATED!"
Shutdown OK %1

:Fini
-----




I have a computers.txt file at the root of c: that has a list of the servers to shut down (this is handy because we have other computers on the network that are run of "dumb APCs" and this allows me to shut them down over the network also). In the services of the DC (which all this is running on) I have APC PBE Agent and APC PBE Server log on a domain administrator account (has full admin rights to EVERY computer on the network). I previously tried using Local System Account and having Allow service to interact with desktop, but that didn't work either. I have restarted the service every time I've made changes.


We are having this exact problem in multiple locations throughout the company, where PowerChute would gracefully shut down ALL servers - but it seems that the configuration took a hike on every single server (Windows Update anyone?)

Message was edited by: ChrisInVT

See Answer In Context

14 Replies 14
BillP
Administrator Administrator
Administrator
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This reply was originally posted by Jonathan on APC forums on 8/10/2009


Welcome to the APC Forum Chris,

To my knowledge our software can only execute a single line command file only. My suggestion for you is to create a single line command file which will then call your multi-line command file. If you need help using and or writing command files please take a look at this knowledge base article --> [http://nam-en.apc.com/cgi-bin/nam_en.cfg/php/enduser/std_adp.php?p_faqid=7712].

BillP
Administrator Administrator
Administrator
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This reply was originally posted by Jonathan on APC forums on 8/11/2009


Chris,

Would it be okay if you post a screenshot of your PCBE configuration and on what event are you calling these command files? Can you also attach the command files you've made, if I find time today I will try to simulate it here in our lab. Also are you calling these files on the PCBE Agent that are on the basic or advance port?

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/11/2009


All operations are done on the DC which is hooked up to the advanced port of the UPS. The DC talks to the APC perfectly, but the two servers that are on the basic ports of the AP9607 don't even know they're connected to anything.

I have attached some screenshots and the batch files. I have PowerChute trying to execute shutdown.bat, which executes ShutdownServers.bat, which pulls the computer list from the computers.txt file. I can run shutdown.bat outside of PowerChute and it'll execute ShutdownServers.bat and our proxy server will start the shutdown sequence. For some reason, I just cannot get PowerChute to execute any command files during the shutdown sequence.

(Screenshots only in this post)

Attachments
ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/11/2009


Jon,

I originally made a Shutdown.bat file to call the multi-line one, but that didn't seem to work (I actually have that KB article printed out in filed in my "APC" folder).

I've tried the following 6 lines (one at a time) in my Shutdown.bat file:

@START "" "C:\ShutdownServers.com"
@START "" "C:\ShutdownServers.bat"
"C:\ShutdownServers.com"
"C:\ShutdownServers.bat"
C:\ShutdownServers.com
C:\ShutdownServers.bat


I've even tried what the article said to do and created a test.bat file with the following line in it:

time /T >> C:\apctest\cmdtest.txt

I then created the apctest folder at the root of C: and killed the power to the UPS. I waited about 30 seconds before restoring the power to the unit and checking the server. The apctest foder was empty, and no cmdtest.txt file was created.

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/11/2009


All files at the root of C: other than the single line file for PCBE which I have in C:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles.

I'm using my domain admin account so I have full administrative rights to every PC on the network. I have the PCBE services using domain admin credentials also.

BillP
Administrator Administrator
Administrator
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This reply was originally posted by Jonathan on APC forums on 8/11/2009


Thanks Chris, I'll let you know once I've tested these command files. Also, where did you saved the shutdown.bat on your PC is it on the default cmd files folder of PCBE? I assume that you already have admin rights on the PC that you are trying to shutdown because I tried a shutdown command before and it only pushed through once I added the username that I am using on the remote computer.

BillP
Administrator Administrator
Administrator
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This reply was originally posted by Jonathan on APC forums on 8/26/2009


Chris,

I used that application to open the command files and I am studying it's flow to make sure that the necessary credentials are available on the remote PC that I am going to shutdown.

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/25/2009


I think JonPro disappeared....


Does anyone have any other ideas?

BillP
Administrator Administrator
Administrator
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This reply was originally posted by Jonathan on APC forums on 8/26/2009


Chris,

I'm still present though I still haven't tried the command files in our lab as it is being used for almost a month for training purposes. I found a slot this coming Monday to try these command files. Also, I'm still trying to figure out how should I edit these command files so that it can use the names of the PCs in the lab.

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/26/2009


Editing them in notepad would be easiest.

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 9/1/2009


If your on a domain you need domain administrator credentials. If you'r not on a domain, you need the credentials of a local account on the PC your trying to shut down

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 9/8/2009


Can anyone offer some insight? I've had this ticket opened for almost a month now with no resolution. I need to get this fixed like, two months ago.

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
463

Re: Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 9/18/2009


So everyone that has a Smart UPS with an Interface Expander has absolutely no problems?

ChrisInVT_apc
Ensign
Ensign
0 Likes
0
464

Smart-UPS 1500VA w/ Interface Expander AP9607 & Powerchute Command File

This was originally posted on APC forums on 8/10/2009


OK, this setup is taking years off my life due to the stress I'm encountering in trying to get it working properly.

We have a Smart-UPS 1500VA with two Windows 2003 servers and one Windows XP Pro server sucking power through it. One 2003 server is a DC, the other a NAS. The XP server is a Proxy and AntiVirus server. The DC is connected directly to the UPS VIA serial port. The Proxy & NAS are connected to the UPS's AP9607 Interface Expander VIA serial ports with the supplied cables. We are running PowerChute Business Edition Basic 7.0.2 build 110 (The software CD that came with the UPS) with the Agent/Server/Console on the DC. The Agent is also installed on the Proxy and NAS, along with the console on my desktop PC so I can administer everything without having to log into the DC.

In the Device list Configuration wizard, the Proxy & NAS are visible under Discovered Devices - but when added to Current Device List fail with the error +"Failed to apply the configuration profile to servername.domainname.local"+. therefor, I am unable to get the other two servers to gracefully shutdown. When we had a power failure several days ago, our DC gracefully shut down, but the Proxy & NAS went down hard. I've had problems with this happening in the past and resorted to using a command file to shut down the two servers over the network (since our backbone is on another UPS). Unfortunately, it seems that this took a hike also.

In the shutdown sequence, I have the Command File (ShutdownServers.cmd) to execute immediately and run for a duration of 1 minute. The command file works beautifully if ran; but PowerChute seems not to play nice with it. This is the contents of ShutdownServers.cmd:



-----
@echo off
for /f %%a in (c:\computers.txt) do call :shutdown %%a
goto :eof

:shutdown
echo Shutting down: %1
ping -n 1 -w 800 %1
if not errorlevel 1 goto MachineOK
echo Cannot ping machine %1. Aborting.
goto Fini

:MachineOK
shutdown.exe -s -f -m \\%1 -t 300 -D p:6:12 -c "A POWER FAILURE HAS BEEN DETECTED - SERVER SHUTDOWN INITIATED!"
Shutdown OK %1

:Fini
-----




I have a computers.txt file at the root of c: that has a list of the servers to shut down (this is handy because we have other computers on the network that are run of "dumb APCs" and this allows me to shut them down over the network also). In the services of the DC (which all this is running on) I have APC PBE Agent and APC PBE Server log on a domain administrator account (has full admin rights to EVERY computer on the network). I previously tried using Local System Account and having Allow service to interact with desktop, but that didn't work either. I have restarted the service every time I've made changes.


We are having this exact problem in multiple locations throughout the company, where PowerChute would gracefully shut down ALL servers - but it seems that the configuration took a hike on every single server (Windows Update anyone?)

Message was edited by: ChrisInVT