ArcMap Service Editor Not Responding - Publish geoprocessing Service

642
8
01-08-2019 11:33 AM
JinShang
New Contributor

I am publishing a geoprocessing Service to arc Server. The tool I created works very good in the arcmap and then when I publish it to the arcgis server and click the Analyze or Publish button, the service editor Not Responding. I tried my old service I published before, which are also Not Responding right now. I have been working on this for long time. Does anyone has any idea why and how to fix it?

Thanks!

0 Kudos
8 Replies
NickN
by
New Contributor III

Ah the dreaded year old thread with the same issue I'm having with no replies. I have this exact issue going on in 10.7.1 ArcMap. Also, when I try to publish from ArcPro I get an error that says Failed to Consolidate. I've tried from different machines, making sure the script is local and not across a file share. Nothing matters. It runs fine if I just run the tool in either application.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Are you copying data to the server when you publish? What I would try is to split the script up and see if it's a certain data set or section that's causing the problem. You can also try to publish a basic script to see if that works, (let's say something that just buffers an input point via a feature set).

The publishing process first creates the SD file, essentially a ZIP with any input data, (if it's not registered), and any other data files that are required to run. This is all done via the client, so either Pro or ArcMap. Next, it publishes the SD, which is all handled by Server. If the first step fails, it won't return any errors in the Server logs and unfortunately, there isn't much to go on in terms of logs when packaging the SD fails.

NickN
by
New Contributor III

Yeseterday after posting I tried "one more thing" and copied the python script to the root of my D: drive. The publish succeeded but took 10 minutes. I decided to go look in the arcgisinput folder on the server for that service to see if I could tell what took forever. The folder size was 83MB!

So, digging into those folders I went into the extracted\v101\shapefile_data\ folder to see if it was copying data to the server. Turns out it was, but it was all the other files in the root of my D: drive...nothing to do with the script or data at all! It so happened one of the files there was the ArcGIS Web AppBuilder zip so that's 82MB. So now that's sitting in the upload folder for the servive. I have no idea why it is doing this.

So, thinking I had solved the issue of why it was taking so long, I moved the script to it's own folder beneath one registered with the server with nothing else in there. Ran it in ArcCatalog, ran fine. Published...it still took 10 minutes. There's even the dialog that shows what datasets are going to be copied to the server and it's empty. Investigated the same folders as before, now it's only 900KB...still took 10 minutes.

Then I decided to try publishing again from ArcPro and same staging failure.

Consolidation failed    ErrorMessage: Consolidation failed

ERROR 999999: Something unexpected caused the tool to fail.

Failed to execute (StageService).    ErrorMessage: Failed to execute (StageService).   

Staging failed    ErrorMessage: Staging failed

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Can you check the environment variables on the machine and see if you've defined the PYTHON_PATH environment variable? I can't recall the specifics but I've seen this before and the problem was the PYTHON_PATH variable was set. Once it was removed, publishing worked as expected.

NickN
by
New Contributor III

on the machine I'm publishing to or from?

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Where you're publishing from, so your desktop client with Pro or ArcMap.

NickN
by
New Contributor III

so my PATH variable had the Python27 paths in there, but not the 3.6 ones, so I added that one and still got the same error as above. Then I went back and basically stripped the script down to 3 lines:

import arcpy
input = arcpy.GetParameter(0)
output = arcpy.SetParameterAsText(1,"TEST")

That published fine from ArcPro. So, I decided to put lines back one by one and see where it failed. Well, as soon as I do import os I get the staging error. Take that line out, it publishes fine. I do an import datetime and import FPDF without issue, it's as soon as I import os. So I took out all the references to the os module and published, and it went fine.

0 Kudos
RachelSears
Occasional Contributor II

Hi Nick and Jin,

In ArcGIS Server Manager, check to make sure that the PublishingTools service is started. You can also try stopping and re-starting this service using the start and stop icons next to the service name:

If your services are stopped or unable to start, you may want to open the task manager on the Server machine and examine the number of ArcSOC.exe processes and the CPU/memory usage to see if the Server is under high load. ArcSOC.exe processes are spun up on the machine when tasks are performed on that service (such as panning or zooming in a map service), but for services that are not used as frequently, you may want to consider setting the minimum number of instances per machine to 0 (on the pooling tab of the service):

Also, what messages are you seeing in the ArcGIS Server Manager logs? These might give us more information, such as if the PublishingTools service is crashing at the point of failure. You may need to set the log filter to verbose to see more information.

Best,

Rachel

0 Kudos