Wednesday 28 August 2013

An error occured: "System.IO.InvalidDataException" "Multiple Active Directory entries were found for type "ms-RTC-SIP-TrustedService"

A strange issue happened recently with Lync 2013 LHPv2 (Lync Online – Lync Hosting Pack) – however it also appeared to affect Lync 2010 and Lync 2013 Standard and Enterprise editions also after going through all questions on the internet around it and no apparent resolution.

I was getting this error upon trying to publish the Topology as shown here:


If I tried to remove the Trusted Application from the Topology Builder and re-publish I still got:


And using Remove-CsTrustedApplication prior to removing the Trusted Service from the Topology gave me the same error too:



Browsing to a Domain Controller and going to Configuration Container | Services | RTC Service | Trusted Services, I could see multiple entries for the Trusted Application Server – backing up the error both from the shell and when trying to publish the Topology.




So to resolve the issue I needed to ensure just the one was present. This would allow me to fix the issue but alas doesn't tell me why the hell I had this issue in the first place – seemingly 2 weeks after the Trusted Application Server was published into the Topology - a Lync Watcher node in this case.


Being wary of removing the duplicate – and also worried the GUID may very well be linked back to the XDS database, I simply renamed one – allowing me to easily test, with a fail back by renaming it back to it's previous state.



So did this resolve the issue? I tried using Remove-CsTrustedApplication again:


And bingo it removed it.

Now I want to clean up the Topology Builder by removing the Trusted Application from the Topology and re-publishing. I simply don't trust what is there. So I want to get back to a verified Topology state and then I can add the Trusted Application back at a later date.

So I remove the Trusted application, publish the Topology and..

Bingo. It fixed the issue.



However we still have the issue of the renamed object in AD under Configuration Container | Services | RTC Service | Trusted Services

Lets get back there, confirm the remaining object that was not renamed is removed, and then let's remove the renamed duplicate.

I refreshed the view and confirmed the un-altered object was indeed deleted. I then simply deleted the renamed duplicate:



In all instances when dealing with this issue, make sure you have backups of your Lync Topology and back up Active Directory prior to making these kind of hard deletes.

I hope this helps all people with this issue and there's finally a how-to now on the Internet for it.

Take care people,

Oliver Moazzezi - MVP Exchange Server


2 comments:

Unknown said...

Thanks Bro we tested the same its perfectly working fine. Its fixed for my case.

Oliver Moazzezi said...

Glad to help - thanks