Select to view content in your preferred language

AGOL replica removal

17677
23
Jump to solution
07-19-2015 09:09 PM
JustinFritz1
Deactivated User

Hi,

I am trying to update two feature services that belong to one map.  All hosted on AGOL.

I have previously never had any trouble however I now get an error right at the end that says:

"Packaging succeeded, but publishing failed. Service cannot be overwritten if Sync is enabled and Replicas exist"

This map can be taken offline in Collector.  I assume this means that someone has synced the map on their iPad and I cannot overwrite the feature services until they remove that sync.

Is it possible to see which user has the map synced so I can contact them or can I just override the lock somehow?

Neither of these feature services are editable. So overriding the lock won't orphan any data.

I have looked online and it appears you can do both if you are using a server but no mention of it if everything is hosted on AGOL.

Thanks

1 Solution

Accepted Solutions
JustinFritz1
Deactivated User

Thanks Russell.

However this is all hosted on AGOL.

I did however just figure it out.  This process I imagine is similar to the one you describe but just accessed through the website.  So for future reference:

Go to the feature service you are trying to update within AGOL layers tab.

Click on source 'feature service' which is part of the name header above the social media links.

Click on the 'replicas' link.  This will only exist if there are replicas existing.

This will show you the replica ID codes.  You can click on them individually to see information on them such as the username associated with it and the date it was created.

Copy one of the codes (they need to be done individually) and go back a screen and click on the 'unregister replica' link.

Paste the code into the box and click 'unregister replica'

After doing this I could update the feature services again.

However the interesting thing is in this case that the two replicas blocking the update were registered to myself and another guy.  I had checked both those iPads and neither had a synced version of that map on it.  So I don't know why this happened.

View solution in original post

23 Replies
RussRoberts
Esri Notable Contributor

You can see all the replicas when you go to the feature service and check out the replicas through the replica link on your feature service at the REST endpoint.

http://servername/arcgis/rest/services/layername/featureserver/replicas

Then they can remove the offline map from their device through Collectors Manage or you can do it through the REST endpoint of the feature service unRegisterReplica link.

After that you have to update the service definition to disable sync on that layer and then you can overwrite the feature service.

JustinFritz1
Deactivated User

Thanks Russell.

However this is all hosted on AGOL.

I did however just figure it out.  This process I imagine is similar to the one you describe but just accessed through the website.  So for future reference:

Go to the feature service you are trying to update within AGOL layers tab.

Click on source 'feature service' which is part of the name header above the social media links.

Click on the 'replicas' link.  This will only exist if there are replicas existing.

This will show you the replica ID codes.  You can click on them individually to see information on them such as the username associated with it and the date it was created.

Copy one of the codes (they need to be done individually) and go back a screen and click on the 'unregister replica' link.

Paste the code into the box and click 'unregister replica'

After doing this I could update the feature services again.

However the interesting thing is in this case that the two replicas blocking the update were registered to myself and another guy.  I had checked both those iPads and neither had a synced version of that map on it.  So I don't know why this happened.

ShannonPugh
Regular Contributor

Thanks Justin, this was a huge help!

0 Kudos
Sveinung_Bertnes_Råheim
Occasional Contributor

I wonder if this solution is easier?
Open the service in AGO. Go to "settings". Disable "Sync". Save. You will get a warning that there are replicas on the server. Ignore this. Enable sync again.
I have only tried this with one "hidden" replica. That worked. But if it works with several, it will be efficient compared to remove manually one by one.

simoxu
by MVP Regular Contributor
MVP Regular Contributor

Thank you, this helps.

It seems some circumstances can cause dead replicas on the server. I had deleted all my online maps in Collector on all my devices, but when I checked the replicas of the service, I found 4 replicas which stopped me from overwriting my service in AGOL.

I took the same map offline several times on different devices using the same AGOL login, did that cause the issue?

0 Kudos
RussRoberts
Esri Notable Contributor

Depending on how you remove the offline data from the app will push the replicas off the service. If you manually delete or remove the data from the device this will not tell the app to remove the replicas from your service because if you had just moved the data off of the device due to an issue you will still want the replica on the service to be able to save your data and sync it back.

0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

Thanks Russell,

Let's say in Collector. if I download an offline map to edit, I assume a replica will be created for the feature service. when I delete the offline map using the manage tool provided by Collector, I imagine it will notify the service that the replica is not needed any more, and the server will delete the replica as nobody can use this replica at a later time.

but I did some test on my iPad, after I deleted my offline map on the iPad, the replica remained on the server.

I am really confused and this is causing trouble for me, as I have clear all the replica to overwrite my feature service.

Thanks.

Simo

0 Kudos
RussRoberts
Esri Notable Contributor

I talked to the team. There is an issue where the replicas will not get unregistered when you remove it from the app if there are multiple services in the map. This is fixed and will be in a Nov update.

0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

This explains it. I do have multiple services in my map. thanks.

0 Kudos