[omniORB] Registering a server with the wrong IP address

Tristan Richardson tjr@uk.research.att.com
24 Feb 1999 15:40:08 +0000


Paul Garnham <paul.garnham@mocom.com.au> writes:

> I had an issue with the IP address with which a service used to register
> itself with the omniName.
> 
> omniorb2.6
> omniName running on a Sun box (Sol 2.6)
> server process running on NT4 box (with 2 network cards - IP addresses)
> client process running on Sun box (Sol 2.6)
> 
> The server successfully registered its service with the name server.
> The client obtained from the name server the address of the service, but
> could not then find the service.
> 
> We managed to determine that the client was getting a network time-out
> when attempting to locate the service, only 1 of the IP addresses of the
> NT box was visible to the Sun box. The non visible (foreign) IP address
> of the NT box was for the first configured/installed network card, the
> correct (local) IP address was for a subsequently configured/installed
> network card. To solve the problem we swapped the IP address between the
> 2 network cards.
> 
> The server process had obviously registered its service with the name
> server using the first available IP address but communicated with the
> name server over the second network.
> 
> Has anyone else experienced this problem ? Found an alternate solution ?
> 
> Is there any environment variable or setting that can be used to  force
> the IP address to the desired/correct option ?  Should the name server
> validate the network details of the service and establish that it can
> communicate with the registered service ?
> 

Yes, there is a way to do this - simply set the environment variable
OMNIORB_USEHOSTNAME to the IP address or host name you want to use.  This is
documented in the "The omniORB2 API" section of the user's guide (though watch
out for the typo - it's *not* OMNIORB_USEHOSTNAME_VAR as the manual states).

Funnily enough I just came up against this same problem....

Cheers

Tristan

---------------------------------------------------------------------------
Tristan Richardson   tjr@uk.research.att.com   www.uk.research.att.com/~tjr
---------------------------------------------------------------------------
AT&T Laboratories Cambridge, 24a Trumpington Street, Cambridge, CB2 1QA, UK
Tel: +44 1223 343000      Fax: +44 1223 313542      www.uk.research.att.com
---------------------------------------------------------------------------