LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-14-2019, 12:50 PM   #1
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Rep: Reputation: 2
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:

Code:
/home/bill/remote_mnt   *(ro,root_squash,sync,no_subtree_check)
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.
 
Old 06-14-2019, 01:23 PM   #2
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Looking at other websites, some were suggesting that I try turning off the firewall with the following command:

Code:
service iptables stop
This resulted in:

Code:
service: no such service iptables
I should also point out that I can ping the workstation host from the embedded target. I'm connected to both through Putty.

Last edited by Bill_Blessing; 06-14-2019 at 01:27 PM.
 
Old 06-14-2019, 01:25 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
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
 
1 members found this post helpful.
Old 06-14-2019, 01:32 PM   #4
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by MensaWater View Post
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'
 
Old 06-14-2019, 01:38 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Can you provide the output of the following commands:
On target:
ping 192.168.1.151
systemctl status firewalld
iptables -nL

On remote:
ip a |grep 192.168.1.151
systemctl status firewalld
iptables -nL
ping <ip of target>
 
1 members found this post helpful.
Old 06-14-2019, 01:47 PM   #6
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Target:

Code:
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.
Host workstation:

Code:
inet 192.168.1.151/21 brd 192.168.7.255 scope global eth0




● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor p>
   Active: active (running) since Thu 2019-06-13 18:54:11 EDT; 19h ago
     Docs: man:firewalld(1)
 Main PID: 922 (firewalld)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/firewalld.service
           └─922 /usr/bin/python3 -Es /usr/sbin/firewalld --nofork --nopid



Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
INPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0
INPUT_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0
INPUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0
DROP       all  --  0.0.0.0/0            0.0.0.0/0            ctstate INVALID
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
FORWARD_direct  all  --  0.0.0.0/0            0.0.0.0/0
FORWARD_IN_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0
FORWARD_IN_ZONES  all  --  0.0.0.0/0            0.0.0.0/0
FORWARD_OUT_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0
FORWARD_OUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0
DROP       all  --  0.0.0.0/0            0.0.0.0/0            ctstate INVALID
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
OUTPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD_IN_ZONES (1 references)
target     prot opt source               destination
FWDI_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]
FWDI_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_OUT_ZONES (1 references)
target     prot opt source               destination
FWDO_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]
FWDO_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_direct (1 references)
target     prot opt source               destination

Chain FWDI_public (2 references)
target     prot opt source               destination
FWDI_public_log  all  --  0.0.0.0/0            0.0.0.0/0
FWDI_public_deny  all  --  0.0.0.0/0            0.0.0.0/0
FWDI_public_allow  all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0

Chain FWDI_public_allow (1 references)
target     prot opt source               destination

Chain FWDI_public_deny (1 references)
target     prot opt source               destination

Chain FWDI_public_log (1 references)
target     prot opt source               destination

Chain FWDO_public (2 references)
target     prot opt source               destination
FWDO_public_log  all  --  0.0.0.0/0            0.0.0.0/0
FWDO_public_deny  all  --  0.0.0.0/0            0.0.0.0/0
FWDO_public_allow  all  --  0.0.0.0/0            0.0.0.0/0

Chain FWDO_public_allow (1 references)
target     prot opt source               destination

Chain FWDO_public_deny (1 references)
target     prot opt source               destination

Chain FWDO_public_log (1 references)
target     prot opt source               destination

Chain INPUT_ZONES (1 references)
target     prot opt source               destination
IN_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]
IN_public  all  --  0.0.0.0/0            0.0.0.0/0           [goto]

Chain INPUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain INPUT_direct (1 references)
target     prot opt source               destination

Chain IN_public (2 references)
target     prot opt source               destination
IN_public_log  all  --  0.0.0.0/0            0.0.0.0/0
IN_public_deny  all  --  0.0.0.0/0            0.0.0.0/0
IN_public_allow  all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0

Chain IN_public_allow (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_public_deny (1 references)
target     prot opt source               destination

Chain IN_public_log (1 references)
target     prot opt source               destination

Chain OUTPUT_direct (1 references)
target     prot opt source               destination


PING 192.168.1.111 (192.168.1.111) 56(84) bytes of data.
64 bytes from 192.168.1.111: icmp_seq=1 ttl=64 time=0.359 ms
64 bytes from 192.168.1.111: icmp_seq=2 ttl=64 time=0.356 ms
64 bytes from 192.168.1.111: icmp_seq=3 ttl=64 time=0.382 ms
64 bytes from 192.168.1.111: icmp_seq=4 ttl=64 time=0.434 ms
 
Old 06-17-2019, 01:12 PM   #7
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Is there anything else that I can check to at least isolate the problem as either a client or server issue?
 
Old 06-17-2019, 01:46 PM   #8
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,789

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
The first thing a "mount" does is: it queries the rpcbind(or portmap) service on port 111.
You can run this on the command line:
Code:
rpcinfo -p nfsserver
Then "mount" continues with the returned ports and protocols for the rpc program numbers 100003 (nfs) and 100005 (mountd).
 
1 members found this post helpful.
Old 06-17-2019, 03:48 PM   #9
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
I ran that command on the server and I received the following:

Code:
nfsserver: RPC: Unknown host
It took a bit to execute that command, so I tried it again and in the mean time ran the mount command on the target. Same result.
 
Old 06-17-2019, 05:21 PM   #10
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,789

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
For nfsserver you must insert your NFS server i.e. bills_comps.
 
1 members found this post helpful.
Old 06-18-2019, 07:07 AM   #11
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by MadeInGermany View Post
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)
Thanks for bearing with me on this.
 
Old 06-18-2019, 08:06 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,694

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
systemctl disable firewalld
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.
 
2 members found this post helpful.
Old 06-18-2019, 12:10 PM   #13
Bill_Blessing
LQ Newbie
 
Registered: Aug 2007
Location: Cincinnati
Distribution: Opensuse Leap 15.0
Posts: 26

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by michaelk View Post
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.
 
Old 06-18-2019, 01:30 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,694

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
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...

Last edited by michaelk; 06-18-2019 at 01:34 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] yet another cause of mount.nfs: Protocol not supported derguteweka Linux From Scratch 1 12-26-2018 06:22 AM
"Protocol not supported error" after mount yagabey Linux - Embedded & Single-board computer 10 02-04-2011 11:13 AM
[Info] emsene: Login Failed: Protocol Not Supported by Server AleLinuxBSD Debian 0 01-18-2010 02:10 PM
Can not use gaim, says protocol not supported ICO Linux - Newbie 2 11-22-2003 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration