Unable to mount NFS - program not registered

I want to configure NFS server on my R6220 router. Unfortunately not all necessary components were available "out of the box". Mainly "nfs-server" was missing. So I did checkout 18.06.1, compiled it by my self and installed it on my router (with all needed dependencies; modules, libs based on nfs guide and what 'opkg' threw me).
Everything looks configured properly but when I trying to mount something I continuously got error: "Program not registered".

Here is some info:

root@OpenWrt:/# ps |grep rpc
  684 root         0 IW<  [rpciod]
 1758 rpc       1164 S    /usr/sbin/portmap -f
 3790 rpc       1280 S    /usr/sbin/rpcbind -f -w
 3817 root      1536 S    /sbin/rpcd -s /var/run/ubus.sock -t 30
 3862 root      1612 S    /usr/sbin/rpc.statd -p 32778 -o 32779 -F
 3863 root      1876 S    /usr/sbin/rpc.mountd -p 32780 -F
root@OpenWrt:/# showmount --all
clnt_create: RPC: Timed out
root@OpenWrt:/# netstat -an |grep 327
tcp        0      0 0.0.0.0:32777           0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:32778           0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:32780           0.0.0.0:*               LISTEN      
tcp        0      0 :::32777                :::*                    LISTEN      
tcp        0      0 :::32778                :::*                    LISTEN      
tcp        0      0 :::32780                :::*                    LISTEN      
udp        0      0 0.0.0.0:32777           0.0.0.0:*                           
udp        0      0 0.0.0.0:32778           0.0.0.0:*                           
udp        0      0 0.0.0.0:32780           0.0.0.0:*                           
udp        0      0 :::32777                :::*                                
udp        0      0 :::32778                :::*                                
udp        0      0 :::32780                :::*   
root@OpenWrt:/etc# cat exports
/mnt/sda4 *(rw,sync)
# dummy dir for test
/mnt/blah	*(ro,all_squash,insecure,sync)
root@OpenWrt:/# lsmod |grep nfs
dns_resolver            3792  1 nfsv4
lockd                  50880  3 nfsv3,nfsd,nfs
nfs                   116240  2 nfsv4,nfsv3
nfsd                   73792 11 
nfsv3                  17856  0 
nfsv4                 127536  0 
sunrpc                155712 15 nfsv4,nfsv3,nfsd,nfs,lockd

Client side:

$ rpcinfo  192.168.1.1
   program version netid     address                service    owner
    100000    2    tcp       0.0.0.0.0.111          portmapper unknown
    100000    2    udp       0.0.0.0.0.111          portmapper unknown
$  sudo mount -v -t nfs -o auto 192.168.1.1:/mnt/sda4 /mnt/DATA/
mount.nfs: timeout set for Sat Feb  15 21:44:01 2019
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.Program not registered168.1.1,clientaddr=192.168.1.189'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Program not registered
mount.nfs: requested NFS version or transport protocol is not supported

I got same behavior when I'm trying to mount it locally in router so I think it's not firewall or any other connectivity problem.

I'm using Netgear R6220 with:
PRETTY_NAME="OpenWrt 18.06.1"
BUILD_ID="r7258-5eb055306f"
LEDE_BOARD="ramips/mt7621"
LEDE_RELEASE="OpenWrt 18.06.1 r7258-5eb055306f"

1 Like

Same here after opkg upgrade. Current packages versions with the described problem:

kmod-fs-nfs - 4.9.152-1 - Kernel module for NFS client support
kmod-fs-nfs-common - 4.9.152-1 - Common NFS filesystem modules
kmod-fs-nfs-common-rpcsec - 4.9.152-1 - Kernel modules for NFS Secure RPC
kmod-fs-nfs-v3 - 4.9.152-1 - Kernel module for NFS v3 client support
kmod-fs-nfs-v4 - 4.9.152-1 - Kernel module for NFS v4 support
kmod-fs-nfsd - 4.9.152-1 - Kernel module for NFS kernel server support
nfs-kernel-server - 2.3.3-3 - Kernel NFS server support
nfs-kernel-server-utils - 2.3.3-3 - NFS server utils
nfs-utils - 2.3.3-3 - Updated mount.nfs command - allows mounting nfs4 volumes
# opkg list | grep portmap
portmap - 6.0-4 - Portmap is a server that converts RPC (Remote Procedure Call) program numbers into DARPA protocol port numbers.
# opkg list | grep rpcd
rpcd - 2018-11-28-3aa81d0d-1 - This package provides the UBUS RPC backend server to expose various functionality to frontend programs via JSON-RPC.
rpcd-mod-file - 2018-11-28-3aa81d0d-1 - Provides ubus calls for file and directory operations.
rpcd-mod-iwinfo - 2018-11-28-3aa81d0d-1 - Provides ubus calls for accessing iwinfo data.
rpcd-mod-lxc - 20171206 - LXC rpcd module
rpcd-mod-rpcsys - 2018-11-28-3aa81d0d-1 - Provides ubus calls for sysupgrade and password changing.
rpcd-mod-rrdns - 20170710 - Provides rapid mass reverse DNS lookup functionality.