Discussion:
[omniORB] Q: endPoint, endPointPublish and Windows hostname / computername
Martin Trappel
2009-07-21 21:32:32 UTC
Permalink
Hi all.

I'm currently trying to figure out why sometimes putting the
computername into endPointPublish will work and sometimes only the IP
address will work.

I suspect it's got to do with how Windows resolved hostnames (inside
domains or outside etc.), but I'm a bit clueless as to how to narrow the
problem down - dunno what to google for ...

An example for the problem is:
I have a windows machine with a given hostname and I can ping that
machine from my PC.
When - on the remote machine - I set endPoint:0=giop:tcp:sim-host: I
cannot connect to a server running there (CORBA_transient) (but a local
client there can connect). But when I set
endPointPublish:0=giop:tcp:sim-host: instead I can connect to the server.

I know it is recommended to set endPointPublish instead of endPoint, but
sometimes even endPointPublish:...name... does not work, even though I
can ping the name alright.

any pointers?

cheers,
Martin
Felix Nawothnig
2009-07-21 22:50:02 UTC
Permalink
Post by Martin Trappel
I'm currently trying to figure out why sometimes putting the
computername into endPointPublish will work and sometimes only the IP
address will work.
I suspect it's got to do with how Windows resolved hostnames (inside
domains or outside etc.), but I'm a bit clueless as to how to narrow the
problem down - dunno what to google for ...
I don't know if this is related but we had a similar problem a couple of
months ago... we had an omniORB application running as a Windows service
inside a workgroup, in which the boxes get their IP addresses via DHCP.

Turned out most of the time the ORB was already started before the
interface got it's address so it always bound to the loopback device -
there was not much we could do but wait for any updates to the interface
/ routing table and restart our software when it happened. We eventually
did that, although it meant replugging the network cable caused our
process to restart.

In a domain it's simpler, as you just have to depend on the right
service (don't ask me which one... trial and error helps. :-), which
will only successfully start when the network interface used to logon
the domain is available.

As for you resolving hostnames - both the DNS and WINS servers might be
distributed by DHCP, so if you got an omniORB service maybe it just
starts up too soon.

If you don't - can't help you there. :-)

Cheers,

Felix
Duncan Grisby
2009-07-30 21:12:20 UTC
Permalink
Post by Martin Trappel
I have a windows machine with a given hostname and I can ping that
machine from my PC.
When - on the remote machine - I set endPoint:0=giop:tcp:sim-host: I
cannot connect to a server running there (CORBA_transient) (but a
local client there can connect). But when I set
endPointPublish:0=giop:tcp:sim-host: instead I can connect to the
server.
When you set endPoint, it restricts the server to only listen on a
single IP address. It looks up the name you give it, and binds to just
that address. Without an endPoint specification, it defaults to
listening on all its interfaces.

The problem you are seeing is probably that the server has multiple
network interfaces (which may not be real physical interfaces). When the
server looks up its own name, it gets a different IP address to the one
the client sees. Thus with endPoint, the server is listening on just
one, incorrect interface, so the client cannot connect. With
endPointPublish, the server is still listening on all interfaces, so the
client is able to connect.
Post by Martin Trappel
I know it is recommended to set endPointPublish instead of endPoint,
but sometimes even endPointPublish:...name... does not work, even
though I can ping the name alright.
any pointers?
Run both client and server with traceLevel 25. That gives lots of
information about connections. If possible, update to the 4.1.4 release,
since that has even better logging in that respect than earlier
versions.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Martin Trappel
2009-07-31 11:42:16 UTC
Permalink
Post by Duncan Grisby
Post by Martin Trappel
(...)
When - on the remote machine - I set endPoint:0=giop:tcp:sim-host: I
cannot connect to a server running there (CORBA_transient) (but a
local client there can connect). But when I set
endPointPublish:0=giop:tcp:sim-host: instead I can connect to the
server.
When you set endPoint, it restricts the server to only listen on a
single IP address. (...)
(...) When the
server looks up its own name, it gets a different IP address to the one
the client sees. Thus with endPoint, the server is listening on just
one, incorrect interface, so the client cannot connect. (...)
Post by Martin Trappel
(...)
any pointers?
Run both client and server with traceLevel 25. That gives lots of
information about connections. If possible, update to the 4.1.4 release,
since that has even better logging in that respect than earlier
versions.
Duncan - thanks for the additional info.
I'll keep trace level 25 in mind next time we hit any problems. And I
will only use endPointPublish in the future, since it seems to me now
that endPoint with a name instead of an IP doesn't make that much sense.

cheers,
Martin

Loading...