NFS server not reachable by hostname

Until two days ago (Thurs., June 17, 2020), autofs was working and has worked without any issues for several months. Yesterday, Friday, June 18th, the connections failed.

The autofs configuration file auto.misc on the client machines uses the hostname and not the DNS. As shown below, the router name is fios-router.home; the server hostname is linux-5.fios-router.home.

The client shares can be manually mounted on all network machines using the DNS, but not the hostname. As an experiment this morning, I changed the auto.misc designation on one client machine to the DNS of the server, rebooted, and that works. Given that the server DNS is set by DHCP, I recognize that I could permanently set the server DNS, but I wish to continue to use the hostname if possible.

Checking this morning, YaST Services Manager on the server machine indicated the nfs-server service as set to manual start and in the Inactive(Dead) state. According to my notes, I had set that to On Boot start when I set up networking back in January 2020 upon reinstalling the OS (Leap 15.1). This may be a non-issue, given that I was able to manually mount the shares yesterday, but I’m uncertain about that.

The following is from the client machine:

linux-3:~ # ping linux-5.fios-router.home
ping: linux-5.fios-router.home: Name or service not known

* * *

linux-3:~ # ping fios-router.home
ping: fios-router.home: Name or service not known

* * *

linux-3:~ # ping 192.168.1.202
PING 192.168.1.202 (192.168.1.202) 56(84) bytes of data.
64 bytes from 192.168.1.202: icmp_seq=1 ttl=64 time=2.03 ms
64 bytes from 192.168.1.202: icmp_seq=2 ttl=64 time=1.50 ms
64 bytes from 192.168.1.202: icmp_seq=3 ttl=64 time=0.631 ms
64 bytes from 192.168.1.202: icmp_seq=4 ttl=64 time=0.419 ms
64 bytes from 192.168.1.202: icmp_seq=5 ttl=64 time=0.498 ms
64 bytes from 192.168.1.202: icmp_seq=6 ttl=64 time=0.560 ms
^C
--- 192.168.1.202 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5064ms
rtt min/avg/max/mdev = 0.419/0.941/2.038/0.610 ms
linux-3:~ # 

* * * 

linux-3:~ # nslookup linus-5.fios-router.home
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find linus-5.fios-router.home: NXDOMAIN

* * *

linux-3:~ # nslookup
> fios-router.home
Server:         192.168.1.1
Address:        192.168.1.1#53

*** Can't find fios-router.home: No answer
> linux-5.fios-router.home
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find linux-5.fios-router.home: NXDOMAIN

The following is from the server machine:

linux-5:~ # hostname
linux-5.fios-router.home

* * *

linux-5:~ # showmount -e localhost
Export list for localhost:
/z/F *
/z/D *
linux-5:~ # 

* * *

linux-5:~ # systemctl status autofs
● autofs.service - Automounts filesystems on demand
   Loaded: loaded (/usr/lib/systemd/system/autofs.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-06-20 08:01:11 EDT; 15min ago
     Docs: man:automount(8)
           man:autofs(5)
  Process: 1813 ExecStart=/usr/sbin/automount $AUTOFS_OPTIONS -p /var/run/automount.pid (code=exited, status=0/SUCCESS)
 Main PID: 1816 (automount)
    Tasks: 3
   CGroup: /system.slice/autofs.service
           └─1816 /usr/sbin/automount -p /var/run/automount.pid

Jun 20 08:01:11 linux-5.fios-router.home systemd[1]: Starting Automounts filesystems on demand...
Jun 20 08:01:11 linux-5.fios-router.home automount[1816]: do_init:131: lookup(yp): map auto.master: Local domain name not set
Jun 20 08:01:11 linux-5.fios-router.home systemd[1]: Started Automounts filesystems on demand.

* * *

linux-5:~ # firewall-cmd --list-services
ssh dhcpv6-client mountd nfs rpc-bind ipp ipp-client mdns

* * * *

linux-5:~ # systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
           └─NetworkManager-ovs.conf
   Active: active (running) since Sat 2020-06-20 08:01:09 EDT; 2h 42min ago
     Docs: man:NetworkManager(8)
 Main PID: 1187 (NetworkManager)
    Tasks: 4
   CGroup: /system.slice/NetworkManager.service
           ├─1187 /usr/sbin/NetworkManager --no-daemon
           └─1665 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-8876eaac-c159>

Jun 20 08:01:11 linux-5 NetworkManager[1187]: <info>  [1592654471.1271] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-ifa>
Jun 20 08:01:11 linux-5 NetworkManager[1187]: <info>  [1592654471.1274] device (eth0): state change: secondaries -> activated (reason 'none', sys-if>
Jun 20 08:01:11 linux-5 NetworkManager[1187]: <info>  [1592654471.1276] manager: NetworkManager state is now CONNECTED_LOCAL
Jun 20 08:01:11 linux-5 NetworkManager[1187]: <info>  [1592654471.1381] manager: NetworkManager state is now CONNECTED_SITE
Jun 20 08:01:11 linux-5 NetworkManager[1187]: <info>  [1592654471.1381] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Jun 20 08:01:11 linux-5.fios-router.home NetworkManager[1187]: <info>  [1592654471.1382] policy: set-hostname: set hostname to 'linux-5.fios-router.>
Jun 20 08:01:11 linux-5.fios-router.home NetworkManager[1187]: nisdomainname: you must be root to change the domain name
Jun 20 08:01:11 linux-5.fios-router.home NetworkManager[1187]: <info>  [1592654471.3928] device (eth0): Activation: successful, device activated.
Jun 20 08:01:11 linux-5.fios-router.home NetworkManager[1187]: <info>  [1592654471.5822] manager: NetworkManager state is now CONNECTED_GLOBAL
Jun 20 08:01:15 linux-5.fios-router.home NetworkManager[1187]: <info>  [1592654475.4306] manager: startup complete


; vendor preset: disabled)

o

r/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-8876eaac-c159-3685-a954-be3b59aacbcb-eth0.lease -cf /var/lib/NetworkManager/dhclient-et>

vice (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
vice (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
nager: NetworkManager state is now CONNECTED_LOCAL
nager: NetworkManager state is now CONNECTED_SITE
licy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
92654471.1382] policy: set-hostname: set hostname to 'linux-5.fios-router.home' (from system configuration)
me: you must be root to change the domain name
92654471.3928] device (eth0): Activation: successful, device activated.
92654471.5822] manager: NetworkManager state is now CONNECTED_GLOBAL
92654475.4306] manager: startup complete
~
~
-3685-a954-be3b59aacbcb-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0

ce-state: 'managed')
ace-state: 'managed')


home' (from system configuration)
~
lines 1-22/22 (END)

* * *

linux-5:~ # nmcli device show
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         F4:6D:04:1E:B4:67
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wired connection 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.1.202/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 100
IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.DNS[1]:                             192.168.1.1
IP4.DOMAIN[1]:                          fios-router.home
IP6.ADDRESS[1]:                         fe80::99f9:c0e7:7745:2919/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]:                           dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[3]:                           dst = fe80::/64, nh = ::, mt = 100

GENERAL.DEVICE:                         eth1
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         F4:6D:04:1E:B4:68
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               off

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --
lines 2-40/40 (END)

I have made no changes to the machines other than permitting updates via the Online Update; a review of recent updates didn’t indicate any updates I thought might have caused this.

That looks like a DNS lookup problem. Are you sure that there is an active DNS server for the name “fios-router.home” (or whatever name you are using?

I add an entry to “/etc/hosts” on all home machines that need to mount my NFS share. That way, I do not depend on the home router for DNS for local machines.

If you absolutely know that there is nothing wrong with network connectivity or access (eg you can connect by IP address),
Then that means your hostname resolution is broken.

By “uses the hostname but not DNS” which doesn’t actually make sense, I’m assuming that you really mean that your network share uses a different hostname than what is resolvable by your DNS. Hostnames are simply a name mapping to a particular machine or often more specifically the machine’s IP address. A machine can have any number of hostnames map to it, sometimes but not always referenced as an “alias.”

If the above is the case,
Then it should be a simple matter to fix the problem…

  1. You can create a special entry in the /etc/hosts file of every client machine that needs to connect using that hostname.
  2. You can create an entry on your DNS server and let the DNS server do all the network-wide hostname resolution automatically. This may or may not require creating a new zone, but is no bid geal.

You may be wondering about that checkbox that allows DNS to assign “the” hostname to a host…
That is only the preferred name the machine wants used on the network, it does not prevent the machine from being known by other hostnames.

TSU

Thanks for the replies.

I believe the hostname originates at the router, otherwise how would the server machine detect it? Also, the nmcli command yields the router hostname (see the second window, near the end) or

linux-5:~ # nmcli device show
~
P4.DOMAIN[1]:                          fios-router.home

How would I determine if there is an active DNS server? Is that not on the router?

In response to tsu2, what changed from one day to the next? I did not purposely change anything on the router, the server machine, or the client machines.

The auto.misc file contained the following line:

/mnt/m5nfs/f  linux-5.fios-router.home:/z/D

As noted in the original post, to enable autofs to work, I have temporarily changed that to the DNS assigned to the server/

mnt/m5nfs/f  192.168.1.202:/z/D

I recognize that I may have done something inadvertently to suddenly cause this condition.

This is from two of the client machines, yielding the hostname when the DNS is queried, but fails in response to the hostname:

linux-3:~ # nslookup

> 192.168.1.202
202.1.168.192.in-addr.arpa      name = linux-5.fios-router.home.

> linux-5.fios-router.home 
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find linux-5.fios-router.home: NXDOMAIN

> exit

linux-3:~ #

Yes, it does appear that your router provides this functionality. I would investigate the router. Router model? I assume that you can reach it via a web interface for management/diagnostic purposes? Use its IP address with the browser, and login with the requested authentication credentials. Anything changed there? As a last resort perhaps try rebooting your router?

Side note: Many Linux/Mac hosts have avahi running (which uses mDNS/DNS-SD), and this could be used instead if desired. The naming will be of the form ‘.local’. To find these on the LAN do

avahi-browse -at

More info:
https://wiki.archlinux.org/index.php/Avahi#Hostname_resolution
https://niczsoft.com/2016/04/zeroconf-on-opensuse/

Another thought I had…In your opening post you demonstrate that name resolution is not working from the client machine. Is it just this client having the issue perhaps? Does the server (or other hosts) also fail to resolve hostnames in the same way?

deano_ferrari -

Thanks. Regarding the other clients, yes - same issue - it cannot resolve to the hostname, notwithstanding it’s been working for several months (please see post #5).

The router is a Quantum Model FiOS-G1100. Here are links to screenshots from the router administration pages. The fios-router.home hostname is on the first-linked image; the 192.168.202 DNS currently assigned to the server machine appears in three of the other pages.

System settings: https://susepaste.org/49617207
ARP table: https://susepaste.org/14642479DNS server: https://susepaste.org/73044017Home network: https://susepaste.org/50615733](https://susepaste.org/7745685)Server info: https://susepaste.org/7745685

Please let me know what other information I can provide.

What is puzzling is that the hostname displays in response to client-machine-executed nslookup of the server DNS, but the hostname is not reachable by those machines (see output in post #5). I.e., the client is aware of the hostname, but apparently is unable to reach it.

Does name resolution occur solely on the server machine? If that’s true, then my issue is somewhere on the server machine, perhaps in the one of the config files under /etc.

No, as you’ve illustrated it is your router. It is acting as the DNS server in your home network, which manages the mapping of domain names to IP addresses. FWIW, I once owned an ISP-supplied router which did provided the same DNS function whereby the hostnames were discovered via the DHCP connection process and then added to the router’s DNS table dynamically. These days I’m just using Avahi in my small home network, and that works well for me.

BTW, did you try rebooting your router yet?

Thanks. I have not yet rebooted the router. Are there any downsides to rebooting?

There shouldn’t be from a home network perspective. You’re the administrator. :wink:

BTW, while researching this I did find this similar reddit thread (with no solution but a critical appraisal of this router model)…
https://www.reddit.com/r/Fios/comments/ag3gem/quantum_gateway_g1100_internal_local_dns/

Success! Rebooting the router did the trick.

I then rebooted three of the clients (and restored the auto.misc on the machine where I substituted the DNS for the hostname), and now they all work as they did until yesterday.

I gather the router was not resolving hostname against the DNS, even though everything I checked showed nothing amiss.

I thank everyone for their comments, feedback, and suggestions.

Thanks again.

Glad to read of your success with this. :slight_smile:

My guess is that this is a possible contributing factor to your problem.
The DNS setup you posted doesn’t seem to define a DNS zone (ie the NXDOMAIN which your above says is missing).

In any case, I offered a solution which should solve your problem…
Create a /etc/hosts entry that maps the exact name used for your NFS share to an IP address.
Especially if you don’t have to manage more than approx 3 machines on your network which needs this entry, it shouldn’t be onerous. If necessary, if your router supports DhCP options, it’s possible to use DHCP to distribute a custom hosts file to your DHCP clients. Or, set up a BIND DNS server on your file server and use that instead of your current router.

Problem should be solved.

TSU

@tsu2: Read post #13. It’s resolved already following a router reboot.

deano_ferrari -

In post #10, you wrote that you are using Avahi in your network. I gather this is in addition to, or in lieu of, a DNS server.

Please note that while I was aware that Avahi exists – I see the name during boot-up (“Starting Avahi mDNS/DNS-SD Stack…”), until this morning I had no familiarity with Avahi or what it does. Earlier, I began reading a bit about Avahi, as well as zero-configuration networking, multicast DNS, and other apparently related concepts. If I understand it correctly, one of several functions performed by Avahi is the discovery of hosts on a network.

Given that my router’s DNS server appears to be working correctly and my arguably simple network (see https://susepaste.org/73044017), would there be any reason to use Avahi or a benefit gained by doing so?

As I mentioned previously, Avahi implements local hostname resolution using a “hostname.local” naming scheme. As you have a DNS server working for you, there is no benefit from that perspective. Avahi also facilitates device discovery (printers, samba servers, ssh servers etc) on the local network, but nothing needs to be done explicitly on an openSUSE system to take advantage of that as is.

deano_ferrari -

Thank you. If need be, I will revisit Avahi and learn how to use it.

Thankfully, everything on the network is still working after bootup this morning.

Thank you again for your reply and assistance.

All good. :slight_smile: