Groups | Blog | Home
all groups > dotnet remoting > june 2006 >

dotnet remoting : Found two different objects associated with the same URI



sbparsons
6/8/2006 4:26:01 AM
I have a server Singleton running as a service.
I also have a client connectiing through IPC to the server. The client
responds to the 'service shutting down' event by attempting to reconnect to
the server every 10 seconds.

If the service restarts after the first client re-connect attempt and before
the second attempt, everything is grand.

BUT if the client has to wait for 2 cycles (or more) before the service
restarts, the service restart will fail at the RemotingServices.Marshal step
with the following error:

Service cannot be started. System.Runtime.Remoting.RemotingException: Found
two different objects associated with the same URI,
'/58b10bb9_cfe7_4d5f_8bc0_e5f34f1640bb/SentinelServer.rem'.
at System.Runtime.Remoting.IdentityHolder.SetIdentity(Identity idObj,
String URI, DuplicateIdentityOption duplicateOption)
at
System.Runtime.Remoting.IdentityHolder.FindOrCreateServerIdentity(MarshalByRefObject obj, String objURI, Int32 flags)
at
System.Runtime.Remoting.RemotingServices.GetOrCreateIdentity(MarshalByRefObject Obj, String ObjURI)
at
System.Runtime.Remoting.RemotingServices.MarshalInternal(MarshalByRefObject
Obj, String ObjURI, Type RequestedType, Boolean updateChannelData)
at
System.Runtime.Remoting.RemotingServices.MarshalInternal(MarshalByRefObject
Obj, String ObjURI, Type RequestedType)
at System.Runtime.Remoting.RemotingServices.Marshal(MarshalByRefObject
Obj, String URI)
at Agilent.Sentinel.ProgramManagement.ListenerService.OnStart(String[]
args) in C:\Development\Sentinel\ProgramManagement\ListenerSe...

Please could someone guide me through rectifying this... If the client fails
to connect it unregisters it's channel and cleans up after itself before
attempting to reconnect. It somehow seems to leave a stub behind on the
server that interferes with the service creating a new object to marshal -
sbparsons
6/8/2006 6:41:02 AM
Sorry - please ignore the previous thread...

An oversight on my behalf - got it sorted now.


[quoted text, click to view]
GrantWI
6/8/2006 4:17:15 PM
Does the machine on which your remoting server resides have two IP
addresses?
Are you passing any MarshalByRef objects as arguments or results? If
yes, the trouble-shooting chapter in Advanced .NET Remoting explains
how to address this. I don't have that book with me at the moment,
though.
AddThis Social Bookmark Button