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

Thread: Hostnames entries no longer being followed

  1. #1

    Default Hostnames entries no longer being followed

    After a recent 3,000+ file Tumbleweed update, local hostnames are no longer being followed. For example, my home server which used to be available at (example) myusedtoworkserver.lan now fails with "not found" errors.

    Using the IP address of the server directly still works.

    Have tried re-editing / re-saving the hosts file both through YaST (Hostnames tool) and shell.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,403
    Blog Entries
    3

    Default Re: Hostnames entries no longer being followed

    Still working here after that update.

    Maybe check "/etc/nsswitch.conf" (and "/usr/etc/nsswitch.conf").
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by nrickert View Post
    Still working here after that update.

    Maybe check "/etc/nsswitch.conf" (and "/usr/etc/nsswitch.conf").
    Code:
    #
    # /etc/nsswitch.conf
    #
    # An example Name Service Switch config file. This file should be
    # sorted with the most-used services at the beginning.
    #
    # The entry '[NOTFOUND=return]' means that the search for an
    # entry should stop if the search in the previous entry turned
    # up nothing. Note that if the search failed due to some other reason
    # (like no NIS server responding) then the search continues with the
    # next entry.
    #
    # Legal entries are:
    #
    #       compat                  Use compatibility setup
    #       nisplus                 Use NIS+ (NIS version 3)
    #       nis                     Use NIS (NIS version 2), also called YP
    #       dns                     Use DNS (Domain Name Service)
    #       files                   Use the local files
    #       [NOTFOUND=return]       Stop searching if not found so far
    #
    # For more information, please read the nsswitch.conf.5 manual page.
    #
    passwd: compat
    group:  compat
    shadow: compat
    
    hosts:          [NOTFOUND=return] files mdns_minimal dns
    networks:       files dns
    
    services:       files usrfiles
    protocols:      files usrfiles
    rpc:            files usrfiles
    ethers:         files
    netmasks:       files
    netgroup:       files nis
    publickey:      files
    
    bootparams:     files
    automount:      files nis
    aliases:        files
    Code:
    #
    # /etc/nsswitch.conf
    #
    # An example Name Service Switch config file. This file should be
    # sorted with the most-used services at the beginning.
    #
    # Valid databases are: aliases, ethers, group, gshadow, hosts,
    # initgroups, netgroup, networks, passwd, protocols, publickey,
    # rpc, services, and shadow.
    #
    # Valid service provider entries include (in alphabetical order):
    #
    #       compat                  Use /etc files plus *_compat pseudo-db
    #       db                      Use the pre-processed /var/db files
    #       dns                     Use DNS (Domain Name Service)
    #       files                   Use the local files in /etc
    #       hesiod                  Use Hesiod (DNS) for user lookups
    #       nis                     Use NIS (NIS version 2), also called YP
    #       nisplus                 Use NIS+ (NIS version 3)
    #
    # See `info libc 'NSS Basics'` for more information.
    #
    # Commonly used alternative service providers (may need installation):
    #
    #       ldap                    Use LDAP directory server
    #       myhostname              Use systemd host names
    #       mymachines              Use systemd machine names
    #       mdns*, mdns*_minimal    Use Avahi mDNS/DNS-SD
    #       resolve                 Use systemd resolved resolver
    #       sss                     Use System Security Services Daemon (sssd)
    #       systemd                 Use systemd for dynamic user option
    #       winbind                 Use Samba winbind support
    #       wins                    Use Samba wins support
    #       wrapper                 Use wrapper module for testing
    #
    # Notes:
    #
    # 'sssd' performs its own 'files'-based caching, so it should generally
    # come before 'files'.
    #
    # WARNING: Running nscd with a secondary caching service like sssd may
    #          lead to unexpected behaviour, especially with how long
    #          entries are cached.
    #
    # Installation instructions:
    #
    # To use 'db', install the appropriate package(s) (provide 'makedb' and
    # libnss_db.so.*), and place the 'db' in front of 'files' for entries
    # you want to be looked up first in the databases, like this:
    #
    # passwd:    db files
    # shadow:    db files
    # group:     db files
    
    passwd:         compat
    group:          compat
    shadow:         compat
    # Allow initgroups to default to the setting for group.
    # initgroups:   compat
    
    hosts:          files dns
    networks:       files dns
    
    aliases:        files usrfiles
    ethers:         files usrfiles
    gshadow:        files usrfiles
    netgroup:       files nis
    protocols:      files usrfiles
    publickey:      files
    rpc:            files usrfiles
    services:       files usrfiles
    
    automount:      files nis
    bootparams:     files
    netmasks:       files

  4. #4
    Join Date
    Sep 2012
    Posts
    5,905

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by 8876523450 View Post
    Code:
    #
    # /etc/nsswitch.conf
    #
    Code:
    #
    # /etc/nsswitch.conf
    #
    And which file is supposed to be /etc/nsswitch.conf and which file /usr/etc/nsswitch.conf?

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,116

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by arvidjaar View Post
    And which file is supposed to be /etc/nsswitch.conf and which file /usr/etc/nsswitch.conf?
    In other words: Please always include your command line to the computer text you post. It is only one more line at the top.
    Henk van Velden

  6. #6

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by arvidjaar View Post
    And which file is supposed to be /etc/nsswitch.conf and which file /usr/etc/nsswitch.conf?
    The first is /etc/nsswitch.conf

    The second is /usr/etc/nsswitch.conf

    I figured that would be logical enough for anyone to follow.

    Yes; both files contain " # /etc/nsswitch.conf " at their start.

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,726
    Blog Entries
    2

    Default Re: Hostnames entries no longer being followed

    As always, use the ping command to test network connectivity... First by IP address, and then by hostname..
    If the ping command works, then the problem is something else.

    So, verifying...
    You're not using DNS to provide name resolution to your server, you're relying on /etc/hosts?

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by tsu2 View Post
    As always, use the ping command to test network connectivity... First by IP address, and then by hostname..
    If the ping command works, then the problem is something else.

    So, verifying...
    You're not using DNS to provide name resolution to your server, you're relying on /etc/hosts?

    TSU
    Ping tests were some of the first things I did before posting here.

    Ping to the hostname no longer works. "Name or service not known." It worked before the Tumbleweed update.

    Ping to the IP address directly works as expected.

    Correct that DNS does not provide resolution to the server (which is inside my house). Has always been through the /etc/hosts file.

    No services provided by the server are reachable through the hostname any longer, such as WWW or rsync or Samba shares. They work when the direct IP is used, however.

  9. #9
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    22,077
    Blog Entries
    1

    Default Re: Hostnames entries no longer being followed

    Quote Originally Posted by 8876523450 View Post
    Ping tests were some of the first things I did before posting here.

    Ping to the hostname no longer works. "Name or service not known." It worked before the Tumbleweed update.

    Ping to the IP address directly works as expected.

    Correct that DNS does not provide resolution to the server (which is inside my house). Has always been through the /etc/hosts file.

    No services provided by the server are reachable through the hostname any longer, such as WWW or rsync or Samba shares. They work when the direct IP is used, however.
    This is wrong...
    Code:
    hosts:          [NOTFOUND=return] files mdns_minimal dns
    It should look more like
    Code:
    hosts:          files mdns_minimal [NOTFOUND=return] dns
    openSUSE Leap 15.2; KDE Plasma 5

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,403
    Blog Entries
    3

    Default Re: Hostnames entries no longer being followed

    [QUOTE=8876523450;2960470]
    Code:
    hosts:          [NOTFOUND=return] files mdns_minimal dns
    That looks weird.

    I see:
    Code:
    hosts:        files mdns_minimal [NOTFOUND=return] dns
    I suggest you try editing that "hosts" line to move the "[NOTFOUND=return]" to after the mdns_minimal (in "/etc/nsswitch.conf")
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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