Home Help Center

Ice::NoEndpointException: no suitable endpoint available for proxy

caguerocaguero Member Carlos AgueroOrganization: Universidad Rey Juan CarlosProject: RoboCup SPL project
Hi,

I am receiving this error when executing my client:
Reference.cpp:1585: Ice::NoEndpointException:
no suitable endpoint available for proxy `NavigationI -t @ CMUcobotAdapter'

The architecture is a registry, a server and a client using indirect proxy, with everything running on the same machine.

The registry is started with:
icegridregistry --Ice.Config=/opt/cmu/registry.cfg

The content of /opt/cmu/registry.cfg is:
IceGrid.Registry.Client.Endpoints=tcp -p 4061
IceGrid.Registry.Server.Endpoints=tcp
IceGrid.Registry.Internal.Endpoints=tcp
IceGrid.Registry.AdminPermissionsVerifier=IceGrid/NullPermissionsVerifier
IceGrid.Registry.Data=/opt/cmu/registry
IceGrid.Registry.DynamicRegistration=1

I also have a folder created on /opt/cmu/registry/

The server object adapter creation is:
ic = Ice::initialize(argc, argv);
Ice::ObjectAdapterPtr adapter = ic->createObjectAdapterWithEndpoints("CMUcobotAdapter", "default -p 10110");
adapter->add(getInstance(), ic->stringToIdentity("NavigationI"));

The server is started with:
./server --Ice.Config=/opt/cmu/server.cfg

The content of /opt/cmu/server.cfg is:
CMUcobotAdapter.AdapterId=CMUcobotAdapter
CMUcobotAdapter.Endpoints=tcp
Ice.Default.Locator=IceGrid/Locator:tcp -p 4061

The proxy creation in the client is:
Ice::ObjectPrx proxy = ic->stringToProxy("[email protected]");
CMU::NavigationIPrx navigationPrx = CMU::NavigationIPrx::checkedCast(proxy);

The client is started with the comand:
./client --Ice.Config=/opt/cmu/client.cfg

The content of /opt/cmu/client.cfg is:
Ice.Default.Locator=IceGrid/Locator:tcp -p 4061

I cannot see the problem, with direct proxies everything was fine, but when I tried to move to an indirect proxie I get this error.

Do you see the problem?

Thanks in advance,
Carlos

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Carlos,

    Which version of Ice are you using?

    Overwriting your endpoint configuration with createObjectAdapterWithEndpoints is unusual; why not create your object adapter with:
    Ice::ObjectAdapterPtr adapter = ic->createObjectAdapter("CMUcobotAdapter");
    

    Do you activate this object adapter?

    Best regards,
    Bernard
  • caguerocaguero Member Carlos AgueroOrganization: Universidad Rey Juan CarlosProject: RoboCup SPL project
    Hi Bernard,

    thanks for your early reply.

    I've tried your suggestion for creating the object adapter and I get an additional error when I start the server:
    ObjectAdapterI.cpp:774: Ice::InitializationException:
    initialization exception:
    object adapter `CMUcobotAdapter' requires configuration
    

    Do I need to add any extra conf. information inside the server.cfg?

    By the way I'am using Ice 3.3.1 and the object adapter is activated (previously I was using direct proxies without problems).

    Best,
    Carlos
    bernard wrote: »
    Hi Carlos,

    Which version of Ice are you using?

    Overwriting your endpoint configuration with createObjectAdapterWithEndpoints is unusual; why not create your object adapter with:
    Ice::ObjectAdapterPtr adapter = ic->createObjectAdapter("CMUcobotAdapter");
    

    Best regards,
    Bernard
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    This exception means Ice can't find the CMUcobotAdapter.Endpoints property in the server configuration file--so it does not find AdapterId either, which explains the initial problem.

    The argc/argv parameters come directly from your main() function?

    Best regards,
    Bernard
  • caguerocaguero Member Carlos AgueroOrganization: Universidad Rey Juan CarlosProject: RoboCup SPL project
    Bernard,

    that was the problem, I was ignoring argc and argv within my code.

    Now, it is working.

    Thanks as always!

    Carlos
    bernard wrote: »
    This exception means Ice can't find the CMUcobotAdapter.Endpoints property in the server configuration file--so it does not find AdapterId either, which explains the initial problem.

    The argc/argv parameters come directly from your main() function?

    Best regards,
    Bernard
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Carlos,

    It's good to see you figured it out. You should also consider upgrading to Ice 3.4.2.

    Best regards,
    Bernard
Sign In or Register to comment.