Archived

This forum has been archived. Please start a new discussion on GitHub.

IceGrid, C# and NoEndpointExceptions

Hi ZeroC,
I'm evaluating Ice for use in future projects. I've read the relevant sections of the manual, but obviously I'm missing something vital.

In a separate window, the server is running with:
icegridnode --Ice.Config=config --warn

and config file
IceGrid.InstanceName=ServICE

#
# The IceGrid locator proxy.
#
Ice.Default.Locator=ServICE/Locator:default

#
# IceGrid registry configuration.
#
IceGrid.Registry.Client.Endpoints=default
IceGrid.Registry.Server.Endpoints=default
IceGrid.Registry.Internal.Endpoints=default
IceGrid.Registry.Admin.Endpoints=default
IceGrid.Registry.Data=db/registry

#
# IceGrid node configuration.
#
IceGrid.Node.Name=localhost
IceGrid.Node.Endpoints=default
IceGrid.Node.Data=db/node
IceGrid.Node.CollocateRegistry=1
#IceGrid.Node.Output=db
#IceGrid.Node.RedirectErrToOut=1

#
# Trace properties.
#
IceGrid.Node.Trace.Activator=1
IceGrid.Node.Trace.Patch=1
IceGrid.Node.Trace.Adapter=2
IceGrid.Node.Trace.Server=3

Using Visual Studio 2003, C#, I have the following:
Ice.ObjectAdapter adapter = ic.createObjectAdapterWithEndpoints("test","default -p 11999");
Ice.ObjectPrx testobject = adapter.add(new TestI("justatest"), Ice.Util.stringToIdentity("testid"));
Ice.ObjectPrx proxy = ic.stringToProxy("IceGrid/Admin");
IceGrid.AdminPrx admin = IceGrid.AdminPrxHelper.checkedCast(proxy);

Now, on the last line, I'm getting an exception
Ice.NoEndpointException: NoEndpointException
    proxy = "IceGrid/Admin -t"
   at IceInternal.ProxyFactory.checkRetryAfterException(LocalException ex, Reference ref, Int32 cnt)
   at Ice.ObjectPrxHelperBase.handleException__(LocalException ex, Int32 cnt)
   at Ice.ObjectPrxHelperBase.ice_isA(String id__, Context context__)
   at Ice.ObjectPrxHelperBase.ice_isA(String id__)
   at IceGrid.AdminPrxHelper.checkedCast(ObjectPrx b)
   at Server.ServerForm.ServerForm_Load(Object sender, EventArgs e) in c:\work\service\server\serverform.cs:line 135

This is obviously not what I want. :rolleyes: I would have expected to receive a proxy for the IceGrid.Admin object, as seems to be the case in the manual, section 36.5.3.

Any suggestions?

Best regards,
/Christoffer

Comments

  • Nevermind, found my problem. :o
  • benoit
    benoit Rennes, France
    Hi,

    You need to specify a specific port for the registry client endpoints, for example:
    IceGrid.Registry.Client.Endpoints=default -p 12000
    

    The client endpoints are also used in the locator proxy, so the Ice.Default.Locator property should be set with the following value:
    Ice.Default.Locator=ServICE/Locator:default -p 12000
    

    You should also make sure that the Ice.Default.Locator property is set in the configuration file of your server (or is passed as a command line argument).

    See the section 36.4 of the Ice manual for more information on how to configure the IceGrid components.

    Cheers,
    Benoit.