I have been able to successfully publish a locator to our portal. Works great in a web map and in ArcGIS Pro both in the locator pane and the batch geocoding tools. Used the Create Locator tool in ArcGIS Pro 2.7.2 and published to Enterprise 10.6.1.
I am now trying to update the locator with new addresses. I have successfully used the Rebuild Address Locator tool and tested it locally in Pro to see that the new addresses are being found. However I am getting ERROR 001369: Failed to create the service whenever I try to overwrite or update the locator and geocoding service. I have tried the Overwrite Locator tool in Pro and also this Updating Geocoding Services script. I have also now downgraded to ArcGIS Pro 2.6.3 and rebuilt the locator from scratch, but am still getting the same error when overwriting.
# Execute StageService to convert sddraft file to a service definition (sd) file
arcpy.server.StageService(sddraft_file, sd_file)
# Execute UploadServiceDefinition to publish the service definition file as a service
arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
arcpy.AddMessage("The geocode service was successfully published")It does the StageService fine but is erroring on the Upload Service Definition line. Here is the full error message from the script output:
An error occured ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).
ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).
Error thrown
Traceback (most recent call last):
File "Update.py", line 235, in main
arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1263, in UploadServiceDefinition
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1260, 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 511, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.Is anyone able to help with this? Thanks.