[omniORB] OmniORB on RedHat 7.2

Ulf Stoermer kz_ulf@emi.yamaha.co.jp
Tue, 19 Mar 2002 11:26:15 +0900


Dear all,

I reported a problem about orb->resolve_inital_references()
throwing exceptions in omniNames and the examples programs.

Actually, it turned out to be that my hosts file was setup wrongly.

But there is one interesting point that I want to make here.
In the mailing list archives one can find a posting from Jan 2001
that states as follows:
>
>This is another frequently encountered problem with recent redhat
>installations. I don't know if other installations do the same. IMO, it is
>not how one should configure a networked machine.
>Redhat always put something like this in your /etc/hosts:
>   127.0.0.1 foo localhost.localdomain localhost
>
>This is ok if yours is a home machine with just a dialup interface.
>But on a networked machine, if you have that entry and one do a name to
>address lookup for "foo", what you get is 127.0.0.1. In other words, one
>cannot find out what the real IP address of your host is.
>
>By default, omniORB always try to use the IP address, instead of the
>hostname in the IORs it gives out. So it uses host to address lookup.
>And it gets 127.0.0.1. Being a local loopback network interface, the
>address obviously cannot work on other machines.
>
>The solution is either:
>1. Remove "foo" from the /etc/hosts, (PREFERRED)
>2. Start your server with this ORB option:
>      $./eg2_impl -ORBpoa_iiop_name_port "foo"
>
>Regards,
>Sai-Lai

The recommended solution nr 1 (remove "foo") actually caused
my problem. Putting back the localhost entry into the hosts-file
like it was done by the redhat installation and my problems went
away.
Well, I haven't tried any Corba-invocations over the network yet,
maybe there's more trouble on the way, but I'd say: Don't remove
that line from your hosts-file.

Kind regards

Ulf