2

I have a small and simple geoprocessing script that I am trying to expose as a geoprocessing service in ArcGIS Server 10 SP4. The script is below. Pardon the hard-coding...

With the hard-coded variables, this script runs perfectly fine in desktop. However, once published as gp service, it crashes in a bad way, like I can't even trap the error. The exact message in the GIS Server log - "Container process 6436 has crashed on machine westchamp24-pc."

A couple of potential causes I can eliminate right off the bat:

  1. Permissions: The entire D: drive is wide open to the 'Everyone' user
  2. Licensing: ArcGIS Server is licensed at Enterprise level

    # Check out the ArcGIS Spatial Analyst extension license
    arcpy.CheckOutExtension("Spatial")
    
    # Execute CostDistance
    outCostDistance = CostDistance("origin",SOURCE,"#","D:/RasterStuff/backlinkRaster.tif")
    
    # Execute CostPath
    outCostPath = CostPath("destination", outCostDistance,"D:/RasterStuff/backlinkRaster.tif")
    
    # Convert Result to Polyline
    arcpy.RasterToPolyline_conversion(outCostPath, "D:/RasterStuff/costPath.shp")
    featSet = arcpy.FeatureSet()
    featSet.load("in_memory/costPath")
    
    arcpy.SetParameter(0,featSet)
    

    except: # do stuff with error print finally: print

1
  • Can you set up other geoprocessing services? I would try to get your gp service to do something more simple than loading feature sets. Get it to arcpy.AddMessage() something which will be a message in the Results tab in ArcMap or you can find these messages with a jobid on the Rest endpoint for this gp service. Afterwards then see if you can see your data in the jobid folder under the arcgisjobs folder
    – Justin
    Jul 3, 2012 at 18:58

2 Answers 2

2

Have you created an ArcGISSOC user account on the machine with the D:\ drive? If not it will most likely be required to access the data there. Set it to the name "ArcGISSOC" and password the same as the server SOC password. Following that, give that account explicit read access to the directory with the resources ("D:/RasterStuff/" in your case).

3
  • I gave the 'Everyone' user full control of the entire directory, which should encompass the ArcGISSOC user.
    – user890
    Jul 3, 2012 at 16:44
  • resources.arcgis.com/en/help/main/10.1/#/… Check here. Like I said, try granting ArcGISSOC the read permissions explicitly instead of an implicit "Everyone" access.
    – AHigh
    Jul 3, 2012 at 16:51
  • same result with permissions explicitly assinged to ArcGISSOC.
    – user890
    Jul 3, 2012 at 17:21
1

I found that when I reverting back to arcgisscripting (instead of arcpy), the gp service works fine...

My code in this script is pretty vanilla - scraped almost entirely from ESRI site, so I have no idea what could be causing the problem.

1
  • So is this the answer?
    – wondim
    May 20, 2019 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.