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

Upgrade to ice 3.2 : problem with Icegrid admin session

We are actually in the process of upgrading the ice version of our system from 3.1 to 3.2.1.
By doing this, we found out a problem trying to get the admin session of our icegrid registry. We are using the NullPermissionsVerifier in this case to simplify the process.

The code is the following:
Ice::ObjectPrx base = m_ic->stringToProxy("IceGridTest/Registry:default -p 12000");
IceGrid::RegistryPrx regObj = IceGrid::RegistryPrx::checkedCast(base);

IceGrid::AdminSessionPrx sess = regObj->createAdminSession("Toto", "");

The problem is that the call of the function getAdmin() returns an Ice.ObjectNotExistException. However, the call to createAdminSession() seems to work correctly and does not return any exception. In particular, we do not get any PermissionDeniedException. The AdminSessionPrx sess is also not null.

The very strange thing is that this code is working fine with ice version 3.1. We are then correctly getting the admin. But when used with ice 3.2.1, it returns this Ice.ObjectNotExistException.

I looked up in the ice 3.2.1 documentation and did not found any changes in the code you provide to create admin session. So I am wondering where the problem is coming from.


  • benoit
    benoit Rennes, France
    Hi Vivien,

    I suspect your problem is caused by different timeout settings with the registry proxy (that you create from the string) and the admin proxy returned by getAdmin(). Do you set a timeout on the endpoints specified with the IceGrid.Registry.Client.Endpoints property?

    You should use the same endpoints for the registry proxy otherwise Ice might use different network connections for invocations on the registry and admin proxies. The registry reject calls on admin sessions (with an Ice::ObjectNotExistExeption exception) if these calls are not received over the same connection as the one used to create the session.

    The simplest would be to configure the default locator (with Ice.Default.Locator) in your client and use the well-known proxy "IceGridTest/Registry" to obtain the registry proxy:
    Ice::ObjectPrx base = m_ic->stringToProxy("IceGridTest/Registry);
    IceGrid::RegistryPrx regObj = IceGrid::RegistryPrx::checkedCast(base);
    IceGrid::AdminSessionPrx sess = regObj->createAdminSession("Toto", "");

    This way you don't have to hardcode the endpoints in your client and don't have to worry about the settings of the registry client endpoints.

    Let us know if this doesn't solve your problem!

  • Thanks, that was actually the problem.

    It works fine now using the well-known proxy with ice 3.2.1.