Using ArcPy on Windows (via ArcGIS Desktop or iPython), I am able to successfully publish map services using the draft/stage/upload approach, however I am not able to perform the same task using ArcPy on the ArcGIS Server (Linux) machine itself.
Creating a draft and analyzing works fine, but when I attempt to stage the service (arcpy.StageService_server(...)) I'm encountering the following error:
arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data failed.
Failed to execute (StageService).
I am using ArcGIS Server 10.2.1 for Linux (RHEL 6, x86_64)
There are several other forum posts mentioning this error message, but I've tried the advice mentioned (shortening staging/connection path names, ensuring adequate storage is available, etc.), but nothing has resolved the problem.
Since I am using the Python/ArcPy environment packaged with the ArcGIS Server machine itself, I suspect what I'm trying to do may not be possible as the ArcInfo licensing level may be required, but that's just a guess.
Is it possible to publish a service using ArcPy on the ArcGIS Server machine itself?
This seems like it should be a fairly common task for enterprise ArcGIS Server installations, since publishing large map services to a remote ArcGIS Server over the internet (not a LAN) is quite time-consuming, so it would be nice to be able to copy the MXD/data to the server manually and run the publishing locally.
Same problem here, looking around the general solution was to change the stage folder to something short like: C:\temp but did't solve my problem. Now I deploy the service by saving the service definition and then publish it in the ArcGisServer Manager (web admin). It's the only way to deploy a Geoprocessing tool for me right now...
Thanks for the input. That sounds like a good workaround for some services, but I don't think that will work for shapefile-based map services that copy data to the server. However I suppose it should work if the shapefiles are copied over manually to a registered data store folder.
Hopefully ESRI can give an answer as to whether or not the original approach is possible.