Results 1 to 3 of 3

Thread: Upgrade to ice 3.2 : problem with Icegrid admin session

  1. #1
    Vivien Delage is offline Registered User
    Name: Vivien Delage
    Organization: Vermont Harding Finance Technologies Ltd.
    Project: TREX-3
    Join Date
    Nov 2006
    Posts
    14

    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", "");
    sess->getAdmin();
    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.
    Vivien Delage
    Vermont Harding Finance Technologies Ltd.
    TREX-3 project

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    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:

    Code:
    Ice::ObjectPrx base = m_ic->stringToProxy("IceGridTest/Registry);
    IceGrid::RegistryPrx regObj = IceGrid::RegistryPrx::checkedCast(base);
    IceGrid::AdminSessionPrx sess = regObj->createAdminSession("Toto", "");
    sess->getAdmin();
    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!

    Cheers,
    Benoit.

  3. #3
    Vivien Delage is offline Registered User
    Name: Vivien Delage
    Organization: Vermont Harding Finance Technologies Ltd.
    Project: TREX-3
    Join Date
    Nov 2006
    Posts
    14
    Thanks, that was actually the problem.

    It works fine now using the well-known proxy with ice 3.2.1.
    Vivien Delage
    Vermont Harding Finance Technologies Ltd.
    TREX-3 project

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 03-07-2011, 03:09 AM
  2. IceGrid - Opening an admin session Ice 3.4
    By Laurent in forum Help Center
    Replies: 11
    Last Post: 03-31-2010, 02:17 PM
  3. Replies: 0
    Last Post: 03-01-2010, 05:21 PM
  4. Problem using IceGrid administrative session
    By akryukov in forum Help Center
    Replies: 5
    Last Post: 03-03-2008, 04:26 PM
  5. Problem keeping IceGrid::Admin session alive
    By borax00 in forum Help Center
    Replies: 2
    Last Post: 05-03-2007, 03:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •