I'm running psexec tasks from bamboo using a variety of approaches and all seem to take the output from psexec and report it in the log files as an error.
My command is using an executable (<drivepath>\psexec.exe) and the command is
e:\bb\build\tools\psexec.exe -h -n 15 \\mydev-web1 %windir%\system32\inetsrv\APPCMD recycle apppool contentplayer
The output looks like this:
command 17-Feb-2013 00:17:55 Beginning to execute external process for build 'mybuild - Recycle MyDev Web1 App Pools'\n ... running command line: \ne:\bb\build\tools\psexec.exe -h -n 15 \\mydev-web1 %windir%\system32\inetsrv\APPCMD recycle apppool defaultapppool\n ... in: E:\bb\xml-data\build-dir\ATI-NG-RDW1AP\n ... using extra environment variables: \nbamboo_BuildPoint=E:\bb\DPBT_NUR\nbamboo_versionNbr=FEB-V13.2\nbamboo_deployRootLoc=E:\BB\build\\nbamboo_FirstSVNVerNbr=5093\nbamboo_branchVariable=/trunk/\nbamboo_CABTarget=Staging\nbamboo_FirstProdSVNVerNbr=4998\nbamboo_labelVar=/trunk/\nbamboo_deployReleasesLoc=E:\bb\build\Releases\\nbamboo_tagVar=trunk\nbamboo_deployReleasesLoc2=E:\\bb\\build\\Releases\\\nbamboo_deployTargetLoc=\nbamboo_lastNextGenBuild=\nbamboo_Previous_build_end_version=5092\nbamboo_deployCopyFromBuild=E:\bb\DPBT_NUR\\nbamboo_ProdRelRoot=E:\bb\build\Releases\Prod\\nbamboo_ProdVerNbr=FEB-V13.2\nbamboo_bambooBuildDir=E:\bb\xml-data\build-dir\\nbamboo_deployTemplate=Full_Deploy_TEMPLATE_SPLIT\n
error 17-Feb-2013 00:17:55
error 17-Feb-2013 00:17:55 PsExec v1.98 - Execute processes remotely
error 17-Feb-2013 00:17:55 Copyright (C) 2001-2010 Mark Russinovich
error 17-Feb-2013 00:17:55 Sysinternals - www.sysinternals.com
error 17-Feb-2013 00:17:55
build 17-Feb-2013 00:17:56 "DefaultAppPool" successfully recycled
error 17-Feb-2013 00:17:56 Connecting to mydev-web1...
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56 Starting PsExec service on mydev-web1...
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56 Connecting with PsExec service on mydev-web1...
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56 Starting C:\Windows\system32\inetsrv\APPCMD on mydev-web1...
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56
error 17-Feb-2013 00:17:56 C:\Windows\system32\inetsrv\APPCMD exited on mydev-web1 with error code 0.
simple 17-Feb-2013 00:17:56 Finished task 'recycle apppool defaultapppool mydev-web1'
Since I really don't know what criteria bamboo or the executable plugin uses to determine if something is an true "error" I can't see a way to adjust the script (or my command line) to account for it. Process hangs and must be job stopped in order to get on with my life. I had the same hung process issue running as a script but I was able to stop and rerun incomplete/failed tasks and it would eventually complete (when I ran it enough times).
Command runs fine from the command line in all cases. I've tried putting it inline script, in a cmd file, and now using the external command (the approach reflected in this output).
I just want to recycle the stupid app pools. I'd like to have a record of it for posterity. (I know it probably doesn't need to be done but it's become a rabbits foot for some of the team). Should I redirect stderr to stdout? does that control what bamboo recognizes as error?
Appreciate any suggestions.