[SOLVED] NFS server: mount.nfs: mount(2): Protocol not supported
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NFS server: mount.nfs: mount(2): Protocol not supported
Background: I'm running a host workstation with OpenSuse Leap 15.0 and I have an embedded development board (SAMA5D27 SOM1 EK) running Poky.
I've been working through the Embedded Linux primer and one of the first things that I'd like to get set up is a NFS. I followed the directions here: https://doc.opensuse.org/documentati...e/cha.nfs.html to get the NFS server up and running.
My exports file looks like this, and remote_mnt exists on the host machine:
On my embedded target board, I have a directory /remote_mnt. When I try running the command, I get the following errors.
Code:
mount -v -t nfs bills_comps:/home/bill/remote_mnt /remote_mnt
Code:
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.151'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.1.151,clientaddr=192.168.1.111'
Finally, for reference, my target /etc/hosts file has the following entry:
Code:
192.168.1.151 bills_comps
I've searched the web and didn't find anything obvious. Any advice? I hope I included enough information for you guys, if not please let me know where I went wrong.
portmap query failed: RPC: Remote system error - No route to host
That is telling you it doesn't know how to get the NFS server (remote) from the NFS client (target).
From the target server does "ping 192.168.1.151" (IP of remote) work?
If so you may need to look at firewall (e.g. iptables or firewalld) settings on the remote. A good way to do that is simply to turn them off. If the mount works after that then you know it is the remotes firewall
That is telling you it doesn't know how to get the NFS server (remote) from the NFS client (target).
From the target server does "ping 192.168.1.151" (IP of remote) work?
If so you may need to look at firewall (e.g. iptables or firewalld) settings on the remote. A good way to do that is simply to turn them off. If the mount works after that then you know it is the remotes firewall
I actually updated my previous post to say that pinging works just fine. I issued the following command to turn off the firewall and tried again:
Code:
systemctl disable firewalld
This didn't appear to change anything, as this is what happened when I tried to mount again:
Code:
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.151'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.1.151,clientaddr=192.168.1.111'
PING 192.168.1.151 (192.168.1.151) 56(84) bytes of data.
64 bytes from 192.168.1.151: icmp_seq=1 ttl=64 time=0.453 ms
64 bytes from 192.168.1.151: icmp_seq=2 ttl=64 time=0.503 ms
64 bytes from 192.168.1.151: icmp_seq=3 ttl=64 time=0.329 ms
64 bytes from 192.168.1.151: icmp_seq=4 ttl=64 time=0.387 ms
-sh: systemctl: command not found
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.14.73-linux4sam_6.0
iptables v1.6.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
For nfsserver you must insert your NFS server i.e. bills_comps.
To be clear, I'm running this on the target (NFS client), right? I was running this command on the server before. The /etc/hosts file that contains the entry for bills_comps is on the client and not the server.
Anyway, I ran the command on the client and I received the following:
Code:
bills_comps: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
Disable does not stop the firewall. It configures a service so it does not start at boot up.
Quote:
systemctl stop firewalld
This will stop the firewall. From your previous post the firewall was still running and it isn't configured to allow nfs traffic. The basic nfs ports are 2049 tcp/udp and 111 tcp/udp for nfs version 3.
Your embedded board is not running systemd so systemctl command fails.
Disable does not stop the firewall. It configures a service so it does not start at boot up.
This will stop the firewall. From your previous post the firewall was still running and it isn't configured to allow nfs traffic. The basic nfs ports are 2049 tcp/udp and 111 tcp/udp for nfs version 3.
Your embedded board is not running systemd so systemctl command fails.
Perfect and thank you! It works. I'll configure the firewall according to your recommendations. TBH, I feel like the Opensuse link could have been a little more helpful in this regard.
Last edited by Bill_Blessing; 06-18-2019 at 12:16 PM.
If a firewall is active on your system (SuSEfirewall2), check Open Ports in Firewall. YaST adapts its configuration for the NFS server by enabling the nfs service.
Its been awhile since I have played with SuSE/YaST. But looks fairly straight forward...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.