Results 1 to 8 of 8

Thread: Glacier2 checkedCast loses connection...

  1. #1
    Unreasonable is offline Registered User
    Join Date
    Oct 2005
    Posts
    4

    Glacier2 checkedCast loses connection...

    I'm trying to use Glacier2 without the default router, in IceJ. I'm stuck and would welcome any hints.

    Currently I'm testing a version of the demo program Callback. I've added the following two lines to the run function:

    Ice.ObjectPrx proxy = communicator().stringToProxy("Glacer2/router:ssl -p 10005");/
    Ice.RouterPrx routerPrxy = Ice.RouterPrxHelper.checkedCast(proxy);

    When I run the Client I get a connection lost exception when it tries to run the checkedCast. The server and session server logs show no indication of connections. The Glacier2 trace shows:

    [ glacier2router: Network: accepted ssl connection
    local address = 3.4.5.6:10005
    remote address = 3.4.5.6:34514 ]
    [ glacier2router: Protocol: sending validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ glacier2router: Network: closing ssl connection
    local address = 3.4.5.6:10005
    remote address = 3.4.5.6:34514 ]


    Thanks,
    Brian

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi Brian,

    Please update your signature as described in our forum support policy.

    Thanks,
    - Mark

  3. #3
    Unreasonable is offline Registered User
    Join Date
    Oct 2005
    Posts
    4

    Red face doh

    Yeah, I saw that policy about two minutes after I posted. It's now updated.

    Apologies,
    Brian
    Brian Dunlavey
    CMU Robotics
    TeRK project

  4. #4
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Thanks Brian,

    Did you configure SSL properly in IceJ? Try setting IceSSL.Trace.Security=1 in the client and Glacier2 to see if any clues are provided.

    Take care,
    - Mark

  5. #5
    Unreasonable is offline Registered User
    Join Date
    Oct 2005
    Posts
    4
    Thanks for the quick reply.

    Ok, I switched everything back to tcp to make things simpler (I hope). I still get the connection lost, and now glacier gives me the following:

    [ glacier2router: Network: accepted tcp connection
    local address = 3.4.5.6:10005
    remote address = 3.4.5.6:33977 ]
    [ glacier2router: Protocol: sending validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ glacier2router: Protocol: received request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 58
    request id = 1
    identity = Glacier2/router
    facet =
    operation = getClientProxy
    mode = 1 (nonmutating)
    context = ]
    [ glacier2router: Protocol: sending reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 51
    request id = 1
    reply status = 2 (object not exist)
    identity = Glacier2/router
    facet =
    operation = getClientProxy ]
    [ glacier2router: Network: closing tcp connection
    local address = 3.4.5.6:10005
    remote address = 3.4.5.6:33977 ]
    Brian Dunlavey
    CMU Robotics
    TeRK project

  6. #6
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    You mentioned that you're not using a default router, but the fact that the protocol tracing includes a request for the operation getClientProxy implies that routing is occurring (or at least being attempted).

    We'll need more information from you before we can resolve the problem. When you say "callback demo", do you mean demo/Ice/callback or demo/Glacier2/callback?

    Have you modified the client's configuration file? If so, what changes did you make? What changes did you make to Glacier2's configuration file?

    - Mark

  7. #7
    Unreasonable is offline Registered User
    Join Date
    Oct 2005
    Posts
    4
    Ok, so I've been messing around with the demo/Glacier2/callback client. With the only configuration changes being to add logging to glacier2, and with

    Ice.ObjectPrx proxy = communicator().stringToProxy("Glacer2/router:ssl -p 10005");/
    Ice.RouterPrx routerPrxy = Ice.RouterPrxHelper.checkedCast(proxy);

    in the top of run (before it goes and gets the default router from the config file), I get the following from glacier2, while my client throws the ConnectionLostException when it tries to do the checkedCast.

    Code:
    [ glacier2router: Network: accepted ssl connection
      local address = 3.4.5.6:10005
      remote address = 3.4.5.6:55924 ]
    [ glacier2router: Protocol: sending validate connection
      message type = 3 (validate connection)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 14 ]
    [ glacier2router: Security: Performing handshake.
      local address = 3.4.5.6:10005
      remote address = 3.4.5.6:55924 ]
    [ glacier2router: Security: Performing handshake.
      local address = 3.4.5.6:10005
      remote address = 3.4.5.6:55924 ]
    [ glacier2router: Security: depth = 1:/C=US/ST=Some State/L=Somewhere/O=Your Company/OU=Development/CN=Your Certificate Authority/emailAddress=you@some.net
      verify return = 1
       ]
    [ glacier2router: Security: depth = 0:/C=US/ST=Some State/O=Your Company/OU=Development/CN=Ice Client
      verify return = 1
       ]
    [ glacier2router: Security: Performing handshake.
      local address = 3.4.5.6:10005
      remote address = 3.4.5.6:55924 ]
    [ glacier2router: Security: Performing handshake.
      local address = 3.4.5.6:10005
      remote address = 3.4.5.6:55924 ]
    [ glacier2router: Protocol: received request
      message type = 0 (request)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 64
      request id = 1
      identity = Glacer2/router
      facet =
      operation = ice_isA
      mode = 1 (nonmutating)
      context =  ]
    [ glacier2router: Protocol: sending reply
      message type = 2 (reply)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 43
      request id = 1
      reply status = 2 (object not exist)
      identity = Glacer2/router
      facet =
      operation = ice_isA ]
    [ glacier2router: Network: closing ssl connection
      local address = 3.4.5.6:32932
      remote address = <not connected> ]
    Brian Dunlavey
    CMU Robotics
    TeRK project

  8. #8
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    There are two problems here. First, you have misspelled the router's identity in your stringified proxy (change "Glacer2" to "Glacier2"). Second, the fact that Ice.Default.Router is defined means stringToProxy returns a routed proxy by default. You cannot use a routed proxy to interact directly with the router, which is what you're doing when you attempt to call checkedCast on this proxy.

    To fix this, you need to reset the router attribute of the proxy like this:
    Code:
    Ice.RouterPrx routerPrxy =
        Ice.RouterPrxHelper.checkedCast(proxy.ice_router(null));
    Take care,
    - Mark

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 02-16-2010, 03:30 PM
  2. proxy loses custom locator
    By timruijs in forum Help Center
    Replies: 6
    Last Post: 11-25-2009, 10:21 AM
  3. Replies: 10
    Last Post: 03-22-2007, 01:27 PM
  4. is there a timeout during checkedCast?
    By leya in forum Help Center
    Replies: 9
    Last Post: 09-05-2006, 07:45 AM
  5. uncheckedCast vs. checkedCast
    By stephan in forum Help Center
    Replies: 9
    Last Post: 12-01-2004, 07:05 PM

Posting Permissions

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