I am developing a C# IceBox service which accesses some well-known objects on our production IceGrid, and so when I am developing I set
Ice.Default.Locator=IceGrid/Locator:tcp -h gridnode1 -p 4061
in my config.servicenet file.
However, after I have set up all my servant objects for the service, and come to call
_adapter.activate()
I get an Ice.UnknownException, containing an "Ice::AdapterAlreadyActiveException" lurking within the "unknown" field.
This is thrown line 1211 of ObjectAdapterI.cs
locatorRegistry.setAdapterDirectProxy(_id, proxy);
The value of locatorRegistry is:
{IceGrid/LocatorRegistry-Master -t:tcp -h gridnode1 -p 3911}
Now -- I have a workaround for development, which is to call:
_adapter.setLocator(null);
prior to activation; but I need to comment this line out prior to deploying the IceBox service via IceGrid, since it causes problems otherwise.
Could anyone give me a hint as to what might be happening, and how I may run the same code in development and on the grid without needing to call this setLocator workaround? Many thanks!

Reply With Quote