I get Duplicate serverid errors when making a connection via the SDK to XProtect

The errors look like this from the MIPSDK logs:

2023-05-10 14:51:40.908 Error: Configuration Initialization ():Duplicate serverid:xxx.xxx.xxx.xxx

2023-05-10 14:51:40.908 Error: SDKConfiguration.Login(Uri) ():Unable to login on server URI=http://xxx.xxx.xxx.xxx/

does anyone know why or how these errors are raised only sometimes and what it could mean?

Update: Thank you Bo! I was able to connect with the ImageViewerClient sample from your link and was able to compare the logon sequence to my own code. The difference was calling VideoOS.Platform.SDK.Environment.RemoveAllServers(); before calling the AddServer() method.

This seemed to clear things out so I could make a new connection. Much appreciated.

It is known if a VMS installation has been cloned then there will be duplicate Ids and it cannot work logging in on a site and its clone.

That might be what is happening. Let’s explore what you have by me asking some questions..

Are you using the MIP SDK to connect to and login on multiple sites or just one?

Do you get the same error if using a unmodified sample from the MIP SDK? (Suggestion; test with the ImageViewerClient sample if not already tested another sample.) (https://github.com/milestonesys/mipsdk-samples-component)

You see the error in the logs, but does it also fail to login? (Error really reflects the behavior you observe?)

What product and version is the XProtect?

Are you using the newest MIP SDK? (https://www.nuget.org/profiles/milestonesys)