I've been having trouble for the past several days with the process of publishing geoprocessing results as a GP service. I started out with my own script, and when I could not get the GP results to publish I tried the Clip and Ship sample, and when publishing those results did not work I set up something ridiculously easy (model which counts from 1-100, no data involved whatsoever). I was unable to publish the GP results from any of the models.
Here's what happens: I can run the model, no matter which script I tried I was successful with getting GP results. I can go through the wizard for 'Share As Geoprocessing Service', and the Analyze tool finds no problems with anything. If I close the wizard before I get to the staging point, the sddraft file is created with no errors. When I either continue in the wizard with creating the service, or reopen the sddraft file and click STAGE, I get to the point where it says PACKAGING IN PROGRESS and then ArcCatalog or ArcMap crashes completely with no other message than 'ArcCatalog Application has stopped working. A problem caused the program to stop working completely. Please close the program.' No error message, no option to send error results to ESRI.
This happens both in ArcMap and ArcCatalog, and it happens with Background Geoprocessing off or on. It has happened both on a server machine and on my desktop with Windows 7. Both machines are Python 32-bit with no 64-bit Python installed.
The Server logs show nothing, as the service never gets far enough to actually be published to Server.
Any ideas about what might be happening? I'm not even sure where to LOOK at this point. I even tried pulling the staging out into a one-line Python script using arcpy.StageService_server, and it crashed Python with no error message.
I've switched my staging folder a couple of times with no change in the end result. I also tried a model which only included a count from 1-100, with no data at all. Same crash. Unfortunately there are no error/dmp files being created when this happens, and when it crashes there is no option to send an error report to ESRI. All I get is the 'ArcMap/ArcCatalog has stopped working' message. This also happens when the StageService_server process is run directly from Python, except in this instance Python crashes with no error messages.
We've just discovered we can publish GP results, IF the publish uses the results from a tool run from a toolbox (Analysis Tools-Proximity-Buffer), but NOT if the results are from a model or Python script.
So, I am not sure why we would not be able to publish results from a model? WORKS - The Buffer tool publishes when results are generated directly from the Proximity toolbox NOT WORKING - The Buffer tool is added to a model and the model is run sucessfully.
This is good and bad news. Good something works. Bad that I'm still puzzled by the time of the crash.
You said you can get into the Service Editor. If there was going to be a crash, I'd suspect it to happen when going into the Service Editor. That is when most things happen. Once you click the publish button 2 things happen: the service is staged (that means data is consolidated put into a single file). Then upload happens which pushes that file up to the server and asks the server to start the service.
I wonder if you run the Package Result tool if that crashes as well? Package Result makes a GPK, which is kind of like what happens when you publish.
When you're in the Service Editor, before you publish, you can modify the parameters of a tool. With your buffer tool, what is the Input Mode for the Input Features set to? Constant, Choice list or user defined? Can you try a different one? What about your custom model/script tool, what are you inputs set to? Any change if you change the input type?
I have exactly the same behaviour on an ArcGIS 10.2 Installation. I can publish "normal" tools but it doesn't work with python scripts. ArcMap or ArcCatalog just crashes without any chance to see why...