Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: confused by hostnames

  1. #1
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default confused by hostnames

    MPICH and OPENMPI seem to have trouble nowadays and I'm not sure why. Here is a typical error:

    patti@OS121-TY3:~/bor> /opt/mpich/ch-p4/bin/mpirun -np 4 pll.exe
    p0_44650: p4_error: Could not gethostbyname for host OS121-TY3; may be invalid name
    : 64
    patti@OS121-TY3:~/bor> hostname
    OS121-TY3
    patti@OS121-TY3:~/bor>

    ...but in the body of my /etc/HOSTNAME file = OS121-TY3.MY-WORKGROUP

    ...so is the trouble with that dot extension? How can mpirun have trouble finding my hostname? I get a similar "Could not gethostbyname for host OS121-TY3" error with Openmpi's mpirun command. I have a single multiprocessor workstation - running Opensuse 12.2 x64

    Thank you for any help!
    Patricia

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,684
    Blog Entries
    3

    Default Re: confused by hostnames

    Quote Originally Posted by PattiMichelle View Post
    MPICH and OPENMPI seem to have trouble nowadays and I'm not sure why. Here is a typical error:

    patti@OS121-TY3:~/bor> /opt/mpich/ch-p4/bin/mpirun -np 4 pll.exe
    p0_44650: p4_error: Could not gethostbyname for host OS121-TY3; may be invalid name
    : 64
    patti@OS121-TY3:~/bor> hostname
    OS121-TY3
    patti@OS121-TY3:~/bor>

    ...but in the body of my /etc/HOSTNAME file = OS121-TY3.MY-WORKGROUP

    ...so is the trouble with that dot extension? How can mpirun have trouble finding my hostname? I get a similar "Could not gethostbyname for host OS121-TY3" error with Openmpi's mpirun command. I have a single multiprocessor workstation - running Opensuse 12.2 x64

    Thank you for any help!
    Patricia
    The gethostbyname() function is looking in DNS and in "/etc/hosts". It is not looking in "/etc/HOSTNAME".
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: confused by hostnames

    Quote Originally Posted by nrickert View Post
    The gethostbyname() function is looking in DNS and in "/etc/hosts". It is not looking in "/etc/HOSTNAME".
    Thanks for the reply - I had not seen this problem before and thought it might have something to do with that dot-extension to the host name since that seems also fairly new (after opensuse 11.x, I think). I had looked in the YaST applet for hosts and didn't see my hostname there (although other things, like 127.0.0.1 and localhost, were there). I just now checked /etc/hosts and did not see my hostname there. Should I add it manually? I'm not sure how it would be picking up that host name since it's not in /etc/hosts - maybe from HOSTNAME? - maybe the DNS picked up the host name and it's getting it from the DNS? (I have a router.)

    I'm stumbling over how this got broke. In the past, openmpi and mpich1.2 were pretty straightforward to use - I didn't have to mess around with host files since this is just a multiprocessor workstation. I *think* this was a vanilla 12.2 setup, but it may have been an online update from 12.1 and maybe things got broken during the update. - Patti

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,684
    Blog Entries
    3

    Default Re: confused by hostnames

    When I set a hostname with Yast, I check the box "Assign hostname to loopback IP". That puts an entry in "/etc/hosts". But whether that's the right entry for your needs, I cannot tell.

    More recently, some folk have been saying that checking that box causes problems for "postfix". I don't use "postfix" so I haven't noticed that.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: confused by hostnames

    Quote Originally Posted by nrickert View Post
    When I set a hostname with Yast, I check the box "Assign hostname to loopback IP". That puts an entry in "/etc/hosts". But whether that's the right entry for your needs, I cannot tell.

    More recently, some folk have been saying that checking that box causes problems for "postfix". I don't use "postfix" so I haven't noticed that.
    Thank you very much, I didn't see that checkbox or else didn't understand what it was meant to do. I will give that a try.

    Patti
    EDIT: There doesn't seem to be such a checkbox in the Yast "Hostnames" applet. Maybe you were referring to another applet? What's odd is that Openmpi is supposed to be "smart" enough to recognize that all procs are on a localhost and not bother with the IP stack for interproc communication. :-/

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: confused by hostnames

    On 2013-12-21 02:56, PattiMichelle wrote:

    > ...but in the body of my /etc/HOSTNAME file = OS121-TY3.MY-WORKGROUP
    >
    > ...so is the trouble with that dot extension?


    Well, anything after the dot is part of the domain, not the hostname. You can set them both in Yast
    network config, "Hostname/DNS" tab. In the same tab you can click on "Assign Hostname to Loopback
    IP" tick.

    I don't think you can have a hostname with a dot in it.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  7. #7
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: confused by hostnames

    Quote Originally Posted by robin_listas View Post
    On 2013-12-21 02:56, PattiMichelle wrote:

    > ...but in the body of my /etc/HOSTNAME file = OS121-TY3.MY-WORKGROUP
    >
    > ...so is the trouble with that dot extension?


    Well, anything after the dot is part of the domain, not the hostname. You can set them both in Yast
    network config, "Hostname/DNS" tab. In the same tab you can click on "Assign Hostname to Loopback
    IP" tick.

    I don't think you can have a hostname with a dot in it.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))
    Hi: What's the name of the Yast applet you're talking about? I tried Hostnames and Network Services and there aren't any tabs.

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,684
    Blog Entries
    3

    Default Re: confused by hostnames

    Quote Originally Posted by PattiMichelle View Post
    Hi: What's the name of the Yast applet you're talking about? I tried Hostnames and Network Services and there aren't any tabs.
    It's "Network Settings".
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: confused by hostnames

    On 2013-12-21 18:26, PattiMichelle wrote:

    > Hi: What's the name of the Yast applet you're talking about? I tried
    > Hostnames and Network Services and there aren't any tabs.


    Yast, Network devices on the left hand panel, Network settings on the right hand panel, click.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  10. #10
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: confused by hostnames

    Quote Originally Posted by nrickert View Post
    It's "Network Settings".
    Heh - OIC - Network Devices, not Network Services... Also, I've been using Network Manager - time to switch back to ifup. After doing so, it added 127.0.0.2 (a "loopback?") to /etc/hosts for my hostname (both full and short) - so we will see if this helps.

    Thank You

    Also, is there a good reason not to disable IPv6 in simple opensuse systems? I noticed sysadmins doing this in Windows - adds unnecessary complexity?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •