AnsweredAssumed Answered

Publish the map service to hosted server.

Question asked by manjarigoyal on Sep 18, 2018
Latest reply on Sep 20, 2018 by MClaggett-esristaff

I am trying to overwrite the existing service but I am getting the error below. The python version I am using is 3.5 and ArcGIS PRO version is 2.0. I am also attaching the Python script I am using.

 

Traceback (most recent call last):
File "\\i-file\Sprint\Network\02\NGN\RingConstruction\AlteryxScripts\publishtest.py", line 56, in <module>
arcpy.UploadServiceDefinition_server(r"\\i-file\Sprint\Network\02\NGN\RingConstruction\DarkFiberProgressReport\NNI\NNItest.sd", "My Hosted Services", "NNItest", "EXISTING","NNI", "STARTED")
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 876, in UploadServiceDefinition
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 873, in UploadServiceDefinition
retval = convertArcObjectToPythonObject(gp.UploadServiceDefinition_server(*gp_fixargs((in_sd_file, in_server, in_service_name, in_cluster, in_folder_type, in_folder, in_startupType, in_override, in_my_contents, in_public, in_organization, in_groups), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 001398: Service name 'NNItest' already exists.
Failed to execute (UploadServiceDefinition).

 

Any help is appreciated.

Attachments

Outcomes