[omniORB] OmniOrb uses wrong network adapter
Duncan Grisby
duncan at grisby.org
Tue Apr 30 18:17:30 BST 2013
On Tue, 2013-04-09 at 18:28 +0200, Peter Danziger wrote:
> I forgot to mention, that we are using corbaloc to access the service,
> e.g. "corbaloc::wgvcxpa1:9942/drsm480". The "wgvcxpa1" is resolved to
> the wrong IP address.
omniORB gives that name to getaddrinfo() or a similar system call to
resolve the name. If a name resolves to multiple addresses, it's up to
the machine's DNS setup as to what order the results come back. If
connecting to an address fails, omniORB actually tries to connect to
other addresses in turn until one works, except that often the only way
to know that a connection has failed is that it times out, by which time
it's too late to try the other addresses.
Every time omniORB needs to open a connection, it re-resolves the name,
so if the name resolution changes, different connection attempts to the
same name can lead to different addresses. omniORB will open a new
connection either if it previously closed the connection because it was
idle, or because it wants to make a concurrent call while another call
is already in progress.
The answer about forcing omniORB to use the address you want ought to be
to use the clientTransportRules configuration, and only allow it to
connect to the correct address. Unfortunately, the transport rules are
evaluated before the name lookup, so they can't save you.
I'll look into processing the transport rules on the resolved names as a
way to avoid this problem. As an alternative, are you able to resolve
the name yourself, rather than using the name in the corbaloc? That way
you'll be able to pick the correct address for yourself.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list