[GIS] psexec remote file execution with ArcGIS Server

arcgis-serverpython

This is perhaps going a bit out of bounds, so i'm not confident I'll get an answer. The short of this is that I've created a python script which leverages psexec to start a bat file on a remote server. This works superb until I publish it. Fortunately I do know where the scripts and models get uploaded to the GIS server after publishing which can help a great deal with diagnostics. Prior to the psexec line in the script, I'm copying a file from one location to another, and I can see that is successful because of the time stamp of the copied file. So, i'm fairly confident that the server is getting hung up on the psexec portion.

Here is what the published script looks like.
enter image description here

The ArcGIS account does have read/execute access to the psexec.exe folder.
When the GP service is run, it just hangs until it times out. So, since I need to define a question: has anyone used psexec in the arcgis server environment? This should be a lot easier than it is. Is there a way to see if the process is hanging on the remote end?

Best Answer

The first place I would check are the logs in the event viewer on the remote server. I see you have 'SQL' in the path there. If you're connecting to a database, ensure the process owner (which I believe would be the ArcGIS Server admin account if you're running it as a GP tool in AGS) has access to the database if you use Active Directory authentication.

You can enable history logging on the remote server as described in this article. That might also give you some clues.

I hope that's a little bit of help. Good luck!

Related Question