English

Problem: Unable to publish a service with the same name as a deleted service

Description

After deleting a service from ArcGIS Online, publishing a new service with the same name as the deleted service fails with the following error:

Error:   
ERROR 001398: Service name <service_name> already exists. 
image of error

Cause

The error occurs when attempting to publish a service with the same partial name of an existing service.

Solution or Workaround

To publish the service, export the service definition file from ArcMap and add as an item to ArcGIS Online. The instructions provided describe how to publish a new service with the same partial name as an existing service.

  1. In ArcMap, click File > Share As > Service.
  2. Select the Save a service definition file option, and click Next.
An image of the 'Share as Service' dialog box.
  1. Select the Choose a connection option, and select an existing connection from the drop-down list.
  2. Enter a service name, and click Next.
An image of selecting a connection and specifying the service name.
  1. Select a location to save the service definition file, and click Continue. The Service Editor dialog box appears.
An image of selecting a location to save the service definition file.
  1. Set the service definition properties, and click Analyze. Warnings and error messages are displayed in the Prepare window.
  2. Fix any errors in the Prepare window, and click Stage. For more information on creating and saving a service definition file, refer to Create a service definition in ArcMap.
An image of the Service Editor.
  1. Sign in to ArcGIS Online.
  2. Navigate to My Content > Add Item > From my computer to add the service definition file.
  3. Select the service definition file, check Publish this file as a layer, and add tags to describe the file.
  4. Click Add Item, and the added file appears in My Content.
An image of adding item from the computer.
An image of a service definition file published as a hosted feature layer.

Related Information