paexec hangs intermittently when run from batch file
I am deploying software to several sets of servers in different test environments. The idea is to completely automate deployments from a build box on a schedule. First I tried psexec, but it only worked 5-10% of the time. PAexec works much better, but I still have problems with it hanging.
Originally I passed the comma-delimited string of server names. Sometimes it works just fine for all the servers. Sometimes, in between servers, it just stops and does not return. The script finishs its work on one server, but paexec does not run it on the next. Here is the command line.
call paexec \\%servers% -n 10 -f -s -w %utildir% -c %utildir%\deployRemote.bat %envdir% %sourcedir%
I thought that there might be some problem with the internal looping through the servers, so I made an external loop that calls paexec multiple times, with one server per call. Still did not fix the problem.
It doesn't fail every time. For example, it will work on 4 of 5 servers, then hang before the last. Running the exact same command for a second time on the last server works. Makes me think it's not a server configuration problem.
Does anyone know why this is happening or what can be done to fix the problem?