Archived

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

Multiple endpoints and By reference proxies

Hi guys,

We are facing a weird issue regarding proxies passed by reference and we might need some help understanding what is happening.

Basically, our clients use a proxy to a session servant to create a session and then the server creates the proxies to all other servants and returns these proxies by reference to the client. The server has multiple network interfaces possibly configured on different sub networks.

When receiving the proxies on the client side, they contain multiple endpoints (one for each IP address the server owns). For instance, here is the result of a ToString() call (C#) on one of the received proxies:
{53ce8ff5-9fc2-4fe4-a935-9cbcc1a3932a -t:tcp -h 192.168.3.68 -p 4505 -t 10000:tcp -h 192.168.180.1 -p 4505 -t 10000:tcp -h 192.168.40.1 -p 4505 -t 10000:tcp -h 192.168.56.1 -p 4505 -t 10000}

Sometimes (but not always), when the client first accesses one of these proxies, it doesn't work because it tries to connect to a wrong endpoint (e.g. the client is connected on the server in the 192.168.3.x network and tries to establish a connection to the 192.168.180.1 endpoint). => Issue confirmed by traces obtained by enabling the Ice.Trace.Network traces (level 2).
Is the Ice client not supposed to choose the appropriate remote endpoint itself and transparently? If not, how is the supposedly correct endpoint chosen then?

We would really need inputs on this matter as we are in kind of a dead end right now.
Thanks ahead.

Cheers.

Comments

  • For information, I found a solution to the issue described above by retrieving the endpoint from the adapter published endpoint that matches the request connection localaddress and then use the ice_endpoints method on the returned proxy by specifying the "correct" endpoint.
    With this method, the client will always use the same endpoint then the one use for the initial request.