Duplicate items in Portal after federating/setting hosted Server

280
5
Jump to solution
03-22-2021 08:21 AM
Mary_GraceMcClellan2
New Contributor III

This weekend I deployed Portal in our production environment, and noticed some behavior that I didn't see in our Development or Staging environments. After federating with Server and setting the Server as a hosting server, I now have duplicates of every item: 

Mary_GraceMcClellan2_0-1616426303817.png

This seems like a bug to me, but maybe there is a setting that I haven't checked? Has anyone else seen/resolved this issue? 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Mary_GraceMcClellan2
New Contributor III

I have resolved this issue, but it took some work. First, here's what I think I did wrong

1. Federated our Server site with Portal.

2. Made all items public in Portal. 

3. Set Server as hosting server. Encountered duplicate content issue described in this post. 

I believe the correct order of operations should be Federate > Set hosting Server > Make items public.

I made the items public immediately so I could minimize service downtime, without thinking about the downtime that would be incurred during the next step anyways. My current theory is that editing the sharing permissions of these items caused them to be duplicated once I set the server as the hosting server, which would be a bug or glitch of some kind but would explain the issue. (I'm open to being corrected, however!) 

 

Resolution: Remove duplicate items.

This was a little more difficult, because deleting a Portal item that is hosted on the hosting server will delete the entire service. On top of that, all of the duplicate items looked exactly the same on the surface, and there is no way to tell from Portal which items I could safely delete. I found that one item in the set was mutually dependent with the service and that one item (the one that was safe to delete) was a shell for the REST service. I used the portal item ID from the service properties to find out which of the two Portal items was interdependent with the service. 

The Portal item ID for an item can be found in the Server administrative directory by navigating to https://{your server URL}/admin/services/{folder}/{service name}.MapServer.  

Example:

Mary_GraceMcClellan2_0-1617024466271.png

I wrote a script using the REST API that pulled out all of these IDs and the service names, then got to work deleting the duplicate items in Portal. It took some time because we have around 200 services, but I thought it was more prudent to delete by hand rather than scripting it. After that, I marked all items as authoritative and delete-protected them. 

I hope this helps someone out there! 

View solution in original post

0 Kudos
5 Replies
nita14
by
Regular Contributor

Hi,

Have you re-indexed the portal content?

BR,
Adam

Mary_GraceMcClellan2
New Contributor III

Hi Adam - I should have mentioned that yes, I have re-indexed a few times since discovering the problem. 

0 Kudos
nita14
by
Regular Contributor

ok, great. Any relevant details in ArcGIS Portal logs folder? No issues with portal internal db?

Br,

Adam

0 Kudos
Mary_GraceMcClellan2
New Contributor III

Unfortunately because I had so many trial and errors yesterday when setting up Portal, it's hard to tell if any of these messages are still relevant now that Portal is up and running: 

Mary_GraceMcClellan2_0-1616437990334.png

At any rate, the hosting server is now validated and the last messages I have are that the Index service, Database Server, and Web Server were all restarted and it's been several hours without a recurrence of the warning messages. 

0 Kudos
Mary_GraceMcClellan2
New Contributor III

I have resolved this issue, but it took some work. First, here's what I think I did wrong

1. Federated our Server site with Portal.

2. Made all items public in Portal. 

3. Set Server as hosting server. Encountered duplicate content issue described in this post. 

I believe the correct order of operations should be Federate > Set hosting Server > Make items public.

I made the items public immediately so I could minimize service downtime, without thinking about the downtime that would be incurred during the next step anyways. My current theory is that editing the sharing permissions of these items caused them to be duplicated once I set the server as the hosting server, which would be a bug or glitch of some kind but would explain the issue. (I'm open to being corrected, however!) 

 

Resolution: Remove duplicate items.

This was a little more difficult, because deleting a Portal item that is hosted on the hosting server will delete the entire service. On top of that, all of the duplicate items looked exactly the same on the surface, and there is no way to tell from Portal which items I could safely delete. I found that one item in the set was mutually dependent with the service and that one item (the one that was safe to delete) was a shell for the REST service. I used the portal item ID from the service properties to find out which of the two Portal items was interdependent with the service. 

The Portal item ID for an item can be found in the Server administrative directory by navigating to https://{your server URL}/admin/services/{folder}/{service name}.MapServer.  

Example:

Mary_GraceMcClellan2_0-1617024466271.png

I wrote a script using the REST API that pulled out all of these IDs and the service names, then got to work deleting the duplicate items in Portal. It took some time because we have around 200 services, but I thought it was more prudent to delete by hand rather than scripting it. After that, I marked all items as authoritative and delete-protected them. 

I hope this helps someone out there! 

View solution in original post

0 Kudos