Publish Toolbox with simple python script to ArcGIS Server

217
2
08-20-2010 06:32 AM
StefanP__Jung
Occasional Contributor
hi all,

i need to publish a python script to an ArcGIS Server 9.2 SP 6 !! Yes i know there is already ArcGIS 10 available but in this case i have to use an old version.

So to test this i have a very simple python script that just contains:

import sys, arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

gp.AddMessage("... executing script ....")


I've added the script to a toolbox without parameters. Running the script now via toolbox works fine.

Next step ist publishing the toolbox to the ArcGIS Server. First time i tried to directly publish it via right clickt => publish to arcgis server, did not work out (later more information about "does not work"). So i choose the option to publish it via right click on Gis Server => MyServer => "Add New Service" => Geoprocessing Service .... selected the toolbox, choos execution type synchronous. .... published!

If i know add this ArcGIS Server Toolbox to my ArcToolbox iam able to run the script on server.

What happens know is that the script never stops running and i dont even get the given "GPMessage". If i cancel the script one ArcSOC.exe process still used 99% of the CPU (single core), the only way to stop it is killing the process.

I already tried to use an UNC path for the toolbox, for the script within the toolbox.

Running the toolbox async also blocks the cpu "forever". and for sure i dont get a feedback via gpMessage here.

Anyone - Any Idea what is happening here? Or what i should test to solve this Problem. (can't upgrade to a newer version in this case - for sure this would be what i like to do.)

Stefan
0 Kudos
2 Replies
MattMoyles
New Contributor III
Hmm I've never tried the Publish to Server option before, whenever I publish my geoprocessing scripts I do it through the rest web admin.  You just add the toolbox and publish it as a REST (default) or other type of service.
0 Kudos
PeterBaldwin
New Contributor II
This happens to me too, I have to close ArcMap to stop it from runnning even if it finished succesfully. There must be a way to stop this?

This is using ArcServer 10 and ArcMap 10 too.
0 Kudos