This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

setup.sh NFS failure

I have an Ubuntu 10.04 install running in VirtualBox and when I try to run the setup.sh script it fails in the nfs-kernel-server script.  All it shows in the terminal window is that it failed, but in the daemon.log file I have a list of entries like this.

May 25 12:57:46 brian-desktop nfsd[7601]: nfssvc: writing fds to kernel failed: errno 13 (Permission denied)
May 25 12:57:46 brian-desktop nfsd[7601]: nfssvc: writing fds to kernel failed: errno 13 (Permission denied)
May 25 12:57:46 brian-desktop portmap[7605]: connect from 192.168.1.65 to set(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7604]: connect from 192.168.1.65 to unset(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7606]: connect from 192.168.1.65 to set(nfs): request from non-local host
May 25 12:57:46 brian-desktop nfsd[7601]: nfssvc: Address already in use
May 25 12:57:46 brian-desktop portmap[7603]: connect from 192.168.1.65 to unset(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7608]: connect from 192.168.1.65 to unset(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7609]: connect from 192.168.1.65 to unset(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7610]: connect from 192.168.1.65 to unset(nfs): request from non-local host
May 25 12:57:46 brian-desktop portmap[7602]: connect from 192.168.1.65 to unset(nfs): request from non-local host

I don't know why I get permission denied, and I don't know anything about NFS.

I am running the setup script with the following command in a terminal window

sudo ./setup.sh

or, I can start up a terminal window with root permission already and run the script and get the same error.

  • Hi Brian!  This can be due to a couple  of things, the key clue being "request from non-local host" in the log. Not as intimately familiar with Ubuntu10 as I am with Fedora or CentOS, but Linux is generally Linux, eh? :)  In order and one at a time:

    1. It looks like rpc.portmapd is running (message coming from that, in fact). That is usually first to check ( ps -ea | grep -i portmap )
    2. Can we check the contents of /etc/hosts.deny and /etc/hosts.allow?  Look specifically for a line that begins with rpcbind. Depending on your setup, you might find a DENY rule like "rpcbind: ALL"  That is generally OK until you don't use ::1 to access the NFS server. Try in hosts.allow adding or editing a line (must be IPv4 numeric, not hostname):

             rpcbind: 192.168.1.65
       
    3. Is name resolution working properly?  In /etc/hosts, do you have your hostname mapped to 127.0.0.1 or something else? Is it DHCP issued?

    Let us know how it goes, there are slightly more roundabout diagnostics, but the above covers the common case(s).

    Cheers!

  • Actually, let's save one email cycle  :)   cut down on electron usage as there's only a fixed number of them (join the Conservation of Charge Movement! OK I'll stop)

    In the /etc/hosts.allow and hosts.deny, might as well specify the others so in the ALLOW file, list the related services on the LHS of the permission ACL:

    rpcbind mountd nfsd statd lockd rquotad : 192.168.1.65

    With this in place, you likely need to add the EVM as well; this script sets it up so the board can use a root partition that's mounted from the host (a boon and timesaver, believe me, particularly when trying to debug u-boot or Colonel Linux itself).

    Cheers!


  • There was nothing at all in either /etc/hosts.allow or /etc/hosts.deny.  In /etc/hosts, the first line is 

    127.0.0.1 localhost

    I tried adding 

    rpcbind: 192.168.1.65

    to the hosts.allow and it made no difference.  So I tried 

    rpcbind mountd nfsd statd lockd rquotad : 192.168.1.65

    in hosts.allow and it also made no difference.  I am still getting 

    May 28 10:03:05 brian-desktop nfsd[2061]: nfssvc: writing fds to kernel failed: errno 13 (Permission denied)
    May 28 10:03:05 brian-desktop nfsd[2061]: nfssvc: writing fds to kernel failed: errno 13 (Permission denied)
    May 28 10:03:05 brian-desktop portmap[2065]: connect from 192.168.1.65 to set(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2066]: connect from 192.168.1.65 to set(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2064]: connect from 192.168.1.65 to unset(nfs): request from non-local host
    May 28 10:03:05 brian-desktop nfsd[2061]: nfssvc: Address already in use
    May 28 10:03:05 brian-desktop portmap[2063]: connect from 192.168.1.65 to unset(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2069]: connect from 192.168.1.65 to unset(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2070]: connect from 192.168.1.65 to unset(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2062]: connect from 192.168.1.65 to unset(nfs): request from non-local host
    May 28 10:03:05 brian-desktop portmap[2068]: connect from 192.168.1.65 to unset(nfs): request from non-local host

    I checked my rpcbind and it's not even installed.  If I sudo apt-get install rpcbind I get

    The following extra packages will be installed:
    libtirpc1
    The following packages will be REMOVED:
    nfs-common nfs-kernel-server portmap
    The following NEW packages will be installed:
    libtirpc1 rpcbind

    I did not do this because it seems to me the packages it wants to remove are supposed to be in there.  Why does this conflict exist?  Should I install rpcbind anyway?