[omniORB] RE: client publishes localhost (127.0.0.1) when listening on hostname

Duncan Grisby duncan at grisby.org
Mon Jun 16 18:32:28 BST 2008


On Tuesday 10 June, "Igor Lautar" wrote:

> Just to sumarize if I understand properly:
> 1) omniORB on server starts-up before wanted network interface is
> initialized

Yes.

>    - or some interface goes down in the meantime and comes back later
> etc., but this is not 100% reproducible, have seen it on XP/Vista,
> omniORB was initialized when non-loop was available, but after some
> network problems started to publish 127.0.0.1

omniORB never changes what it publishes. It sticks with whatever it saw
when it started up. If the network interface was down when omniORB
started up, then it would see just 127.0.0.1. If it failed after omniORB
had started, that wouldn't change what omniORB did.

> 2) omniORB takes whatever interface is available (127.0.0.1) and uses
> this when publishing IORs

Yes. It will always pick something else in preference to 127.0.0.1 (or
::1 in IPv6), but will use that if it's all there is.

> 3) some network interface comes up (ex. 192.168.0.1)
> 4) omniORB now listens on new interface as well (due to 0.0.0.0
> endpoint) but
>    still only publishes interface from point (1) 
> Is my understanding correct?

Yes.

> One other question.
> We have started using two endpoints (giop:tcp:0.0.0.0:23230,
> giop:tcp:<hostname>:23230)
> after moving to omniORB 4.1.1 (from 4.0.7). With default Vista
> instalation, you also
> get IPv6, so with endpoint set to giop:tcp:<hostname>:23230, it wouldn't
> bind to IPv4
> interfaces.
> 
> Is this normal behaviour? My understanding (when specifying such
> endpoint) would be:
> 'bind to everything this hostname resolves to, IPv6 or IPv4'.

No -- omniORB does a single hostname lookup and uses the first address
it gets.

That's why you should use endPointPublish -- that way, you publish the
name you want but you listen on all interfaces. Except that pre-Vista,
Windows couldn't listen on both IPv4 and IPv6 with the same socket.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list