Team Deploy task completes but the MSI isn't updated on the clients. PSExec locks up.

Thanks to Ken Johnson for identifying and documenting this issue and Jeremy Novak for creating the CleanupPsExec task to fix this issue!

Our automated build recently stopped remotely installing our services from the build server (buildserver) to the system test application server (targetserver). It was able to stop and restart the service, and it thought it was installing the services, but the install was not actually running.
Here is a sample of one of our command lines: TeamDeploy.exe /CONFIG:EODService.xml
Because the services installed properly when running the MSI from the application server itself, and because TeamDeploy depends on PSTools for remote deployments, I started looking at thePSTools: specifically PSKill and PSExec.
First I verified that pskill was working remotely by opening notepad on the application server and killing it from the build server:
pskill \\targetserver notepad.exe

PsKill v1.03 - local and remote process killer
Copyright (C) 2000 Mark Russinovich
http://www.sysinternals.com

Process notepad.exe killed on targetserver.

Next, I tried to verify that psexec was working properly:

psexec \\targetserver "c:\windows\system32\ipconfig.exe"

PsExec v1.31 - execute processes remotely
Copyright (C) 2001-2002 Mark Russinovich
www.sysinternals.com

Error communicating with PsExec service on targetserver :
No process is on the other end of the pipe.

It returned an error indicating there was no process on the other end of the pipe. This seemed to indicate a problem with psexesvc.
Since psexesvc installs automatically when running psexec, I removed psexesvc from the application server (1):
sc \\targetserver stop psexesvc
SERVICE_NAME: psexesvc
TYPE : 10 WIN32OWNPROCESS
STATE : 3 STOP_PENDING
(STOPPABLE, NOTPAUSABLE, IGNORESSHUTDOWN))
WIN32EXITCODE : 0 (0x0)
SERVICEEXITCODE : 0 (0x0)
CHECKPOINT : 0x2
WAIT_HINT : 0x0

sc \\targetserver delete psexesvc
SC DeleteService SUCCESS

After cleaning up the psexesvc, I verified that psexec was working properly:

psexec \\targetserver ipconfig

PsExec v1.31 - execute processes remotely
Copyright (C) 2001-2002 Mark Russinovich
www.sysinternals.com



Windows IP Configuration


Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::b5eb:e3
IPv4 Address. . . . . . . . . . . : 10.2.15.171
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 10.2.15.251

Tunnel adapter Local Area Connection* 8:

Media State . . . . . . . . . . . : Media disconn
Connection-specific DNS Suffix . :

Tunnel adapter Local Area Connection* 9:

Media State . . . . . . . . . . . : Media disconn
Connection-specific DNS Suffix . :
ipconfig exited on targetserver with error code 0.

The final test of course was to run TeamDeploy.exe /CONFIG:EODService.xml from the build server, and it successfully installed our service remotely. Our build is back in business!


(1) http://forum.sysinternals.com/forum_posts.asp?TID=3935&PN=1&TPN=2#32755

Last edited Aug 23, 2009 at 3:42 AM by mikedouglas, version 3

Comments

No comments yet.