Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] openmpi 1.6.3 fails to identify local host if its IP is 127.0.1.1
From: Riccardo Murri (riccardo.murri_at_[hidden])
Date: 2013-06-20 04:56:06


On 20 June 2013 06:33, Ralph Castain <rhc_at_[hidden]> wrote:
> Been trying to decipher this problem, and think maybe I'm beginning to
> understand it. Just to clarify:
>
> * when you execute "hostname", you get the <name>.local response?

Yes:

    [rmurri_at_nh64-2-11 ~]$ hostname
    nh64-2-11.local

    [rmurri_at_nh64-2-11 ~]$ uname -n
    nh64-2-11.local

    [rmurri_at_nh64-2-11 ~]$ hostname -s
    nh64-2-11

    [rmurri_at_nh64-2-11 ~]$ hostname -f
    nh64-2-11.local

> * you somewhere have it setup so that 10.x.x.x resolves to <name>, with no
> ".local" extension?

No. Host name resolution is correct, but the hostname resolves to the
127.0.1.1 address:

    [rmurri_at_nh64-2-11 ~]$ getent hosts `hostname`
    127.0.1.1 nh64-2-11.local nh64-2-11

Note that `/etc/hosts` also lists a 10.x.x.x address, which is the one
actually assigned to the ethernet interface:

    [rmurri_at_nh64-2-11 ~]$ fgrep `hostname -s` /etc/hosts
    127.0.1.1 nh64-2-11.local nh64-2-11
    10.1.255.201 nh64-2-11.local nh64-2-11
    192.168.255.206 nh64-2-11-myri0

If we remove the `127.0.1.1` line from `/etc/hosts`, then everything
works again. Also, everything works if we use only FQDNs in the
hostfile.

So it seems that the 127.0.1.1 address is treated specially.

Thanks,
Riccardo