We have several Windows 2003 servers that we run utilities on using psexec. Recently, it stopped working on one of them. For those unfamiliar with it, here's how the process normally works:
Psexec:
- copies PSEXESVC.exe to
\\target\admin$
(Typically C:\WINDOWS) - installs it as a service and starts it
- communicates with the service to have the service start the requested program
- has the service wait for the exit status of the process
- displays the exit status to the user
- stops and deletes the service
- removes PSEXESVC.exe
On the affected server, I have verified everything happens except something in step 3. No matter what program I ask psexec to run (cmd, ping, ipconfig, etc.), it gives the message "command exited on target with error code 128."
This has been seen a few times on the sysinternals forums:
Some claim that the error is returned by the called command, but I think this is just an artifact of the way it's trying to get the exit code. net helpmsg 128
gives "There are no child processes to wait for.", so this makes me think it's failing to wait for the child because there isn't one.
I've verified that the service is in fact starting correctly, that the permissions to the requested program are identical between the working servers and the non-working server, and that psexec works if running from the affected server as local (e.g. with psexec cmd
instead of psexec \\target cmd
).
The only confirmed solution I've seen to this is rebooting the machine. While this is a production server, rebooting during the day is an option since its primary workload is batch style processing at night. However, I am hesitant to reboot, since I would really like to determine the cause of the psexec trouble, and right now the psexec process is being used for development purposes, so there's no production impact to holding off on the reboot.