NFS Client Unable to Mount Shared Directory
Based on your ufw status
output, your firewall is currently configured to only allow incoming connections for SSH. For NFS, you will need to open the nfs (2049) and RPC portmapper (111) ports. If you only want to connect to the server over the LAN, then I'd recommend restricting the host range e.g.
sudo ufw allow from 10.0.0.0/16 to any port 2049
sudo ufw allow from 10.0.0.0/16 to any port 111
otherwise, you will need to allow from any ...
Related videos on Youtube
Will Beauchamp
Updated on September 18, 2022Comments
-
Will Beauchamp over 1 year
I have a server (10.0.0.1) and a client (10.0.0.2) systems, they both run Ubuntu 12.04, they are connected via ethernet.
They can ping each other. They can ssh into one another.
If I on the server I do:
sudo showmount -e 10.0.0.1
all the folders which I want to share are there.
From the server I ssh into the client and do:
sudo showmount -e 10.0.0.1
It times out, or takes so long I ctrl+z out.
I have been trying random suggestions from the internet all morning, any help?
UPDATES!!!!!!
sudo netstat -nlp | grep :111 tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 788/rpcbind tcp6 0 0 :::111 :::* LISTEN 788/rpcbind udp 0 0 0.0.0.0:111 0.0.0.0:* 788/rpcbind udp6 0 0 :::111 :::* 788/rpcbind sudo ufw status numbered Status: active To Action From -- ------ ---- [ 1] 22 ALLOW IN Anywhere [ 2] 22 (v6) ALLOW IN Anywhere (v6)
UPDATE 2!!!!!!! - showmount now works, but unable to mount.
client@client:~$ sudo showmount -e 10.0.0.1 Export list for 10.0.0.1: /export/1TBHDD 10.0.0.0/24 /export/users 10.0.0.0/24 /export 10.0.0.0/24 cliearn@client:~$ sudo mount 10.0.0.1:/export/1TBHDD /export/1TBHDD mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use '-o nolock' to keep locks local, or start statd. mount.nfs: an incorrect mount option was specified client@client:~$ rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 44469 status 100024 1 tcp 54570 status
-
steeldriver almost 10 yearsIs the server's portmapper port (111) open?
-
Will Beauchamp almost 10 yearsHow do I check this? @steeldriver
-
steeldriver almost 10 yearsYou can run
netstat
on the server e.g.sudo netstat -nlp | grep :111
. If you are running ufw then it would also be useful to post the output ofsudo ufw status numbered
. -
Will Beauchamp almost 10 years@steeldriver updated.
-
-
Will Beauchamp almost 10 yearsShowmount is now working onthe client! But when I try to mount the folders I get the following error:
mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use '-o nolock' to keep locks local, or start statd. mount.nfs: an incorrect mount option was specified
-
steeldriver almost 10 yearsHmm... maybe try
sudo service portmap restart
? I'm guessing here -
steeldriver almost 10 yearsI'm hazy on how all the RPC services are interrelated, but in that case maybe try restarting statd directly?
sudo service statd restart