I've been publishing services through arcpy and service definition files from a remote machine, but now want to publish services from a mosaic dataset actually stored on the ArcGIS Server machine.
Is this possible? Is there a local script on the ArcGIS Server for publishing services?
The first problem I've encountered with this plan is that arcpy installed on the server does not seem to include the mapping module, necessary for creating the connection file (which shouldn't be necessary, since I'm already on the machine): CreateGISServerConnectionFile—Help | ArcGIS for Desktop
The rest of my workflow involves creating, staging, and uploading a service definition file.
Is there any way you can copy a previously generated ArcGIS Server connection file from another machine to the machine running ArcGIS Server? These .ags files can be copied between machines, and should work just fine.
I have copied a working .ags to my server machine, however when running CreateImageSDDraft—Help | ArcGIS Desktop I see, "Unable to connect to the provided target server: https://xxx.xxx.xxx.xxx:6443/arcgis/admin/". I've tried with ags files referencing the actual server ip, as well as attempts at 127.0.0.1 and localhost. Any ideas?
I have never seen that particular error message before and I see no other reports of it after a quick GeoNet search. Could you provide the full error trace stack?
Also, what Python ID are you using?
Traceback (most recent call last): File "/arcgis/server/publisher/publish.py", line 175, in publish_dir self.create_sddraft(mds_name, sddraft) File "/arcgis/server/publisher/publish.py", line 95, in create_sddraft "wms_proxy," + mds_name File "/home/arcgis/miniconda2/envs/arcpy-publish/lib/python3.6/site-packages/arcpy/__init__.py", line 2119, in CreateImageSDDraft return arcgisscripting._createimageservicesddraft(raster_or_mosaic_layer, out_sddraft, service_name, server_type, connection_file_path, copy_data_to_server, folder_name, summary, tags) RuntimeError: Unable to connect to the provided target server: https://xxx.xxx.xxx.xxx:6443/arcgis/admin/
More info: using Linux Enterprise AMI on AWS EC2. Do I perhaps need to expose any outgoing ports to allow this sort of roundtrip connection?
I'm using VS Code, but running in bash terminal.