Announcement

Collapse
No announcement yet.

NFS sharing difficulty

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] NFS sharing difficulty

    I have been unable to successfully share files via nfs on my kubuntu 20.04 computer. I have years of experience sharing in ubuntu via nfs but my first time from kubuntu. It appears rpc requests from clients are being rejected. rpc-bind is running. I've opened up all relavent ports with ufw, I've tried disabling ufw, tried about everything. I haven't been able to find an answer. Clients get the message "RPC: Unable to receive". rpcbind is running on the kubuntu serving machine, as well as nfs-server, etc..

    It does appear neither port 111 nor port 2049 are open on the server machine to clients. From a client machine (server is 192.168.0.3):
    client:$ nmap 192.168.0.3
    Nmap scan report for 192.168.0.3
    Host is up (0.0071s latency).
    Not shown: 994 closed ports
    PORT STATE SERVICE
    80/tcp open http
    443/tcp open https
    631/tcp open ipp
    8080/tcp open http-proxy
    9100/tcp open jetdirect
    9220/tcp open unknown

    On the server ports 111 and 2049 seem open:
    server:$ nmap localhost
    Starting Nmap 7.80 ( https://nmap.org ) at 2020-12-17 19:05 PST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00012s latency).
    Not shown: 995 closed ports
    PORT STATE SERVICE
    111/tcp open rpcbind
    139/tcp open netbios-ssn
    445/tcp open microsoft-ds
    631/tcp open ipp
    2049/tcp open nfs


    also:
    server:$ sudo ufw status
    Status: active
    To Action From
    -- ------ ----
    111 ALLOW Anywhere
    2049 ALLOW Anywhere
    111 (v6) ALLOW Anywhere (v6)
    2049 (v6) ALLOW Anywhere (v6)




    Anyone having the same issues or anyone sucessful sharing over nfs in kubuntu 20.*?
    Thanks,
    George

    #2
    I'm using KDEneon and NFS no problems. Have been using NFS for a decade. I've never had to do anything with UFW but I don't run it on my desktops.

    Post your server exports file and the mount command you're using - I assume in fstab.

    Please Read Me

    Comment


      #3
      Code:
      [FONT=monospace][COLOR=#54FF54][B]smith@server[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ sudo rpcinfo -p[/COLOR]
      [sudo] password for smith:          
         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
          100005    1   udp  42419  mountd
          100005    1   tcp  40139  mountd
          100005    2   udp  41794  mountd
          100005    2   tcp  37627  mountd
          100005    3   udp  44500  mountd
          100005    3   tcp  35673  mountd
          100003    3   tcp   2049  nfs
          100003    4   tcp   2049  nfs
          100227    3   tcp   2049
          100003    3   udp   2049  nfs
          100227    3   udp   2049
          100021    1   udp  57818  nlockmgr
          100021    3   udp  57818  nlockmgr
          100021    4   udp  57818  nlockmgr
          100021    1   tcp  43803  nlockmgr
          100021    3   tcp  43803  nlockmgr
          100021    4   tcp  43803  nlockmgr
      [COLOR=#54FF54][B]smith@server[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ systemctl status rpcbind[/COLOR]
      [COLOR=#54FF54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.service - RPC bind portmap service[/COLOR]
         Loaded: loaded (/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
         Active: [COLOR=#54FF54][B]active (running)[/B][/COLOR][COLOR=#000000] since Thu 2020-12-17 16:06:18 EST; 17h ago[/COLOR]
           Docs: man:rpcbind(8)
       Main PID: 876 (rpcbind)
          Tasks: 1 (limit: 4915)
         CGroup: /system.slice/rpcbind.service
                 └─876 /sbin/rpcbind -f -w
      
      Dec 17 16:06:18 server systemd[1]: Starting RPC bind portmap service...
      Dec 17 16:06:18 server systemd[1]: Started RPC bind portmap service.
      [/FONT]
      Code:
      [FONT=monospace][COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#54FFFF][B]~[/B][/COLOR][COLOR=#000000]$ systemctl status rpcbind[/COLOR]
      [COLOR=#54FF54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.service - RPC bind portmap service[/COLOR]
           Loaded: loaded (/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
           Active: [COLOR=#54FF54][B]active (running)[/B][/COLOR][COLOR=#000000] since Tue 2020-12-15 10:14:29 EST; 2 days ago[/COLOR]
      TriggeredBy: [COLOR=#54FF54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.socket[/COLOR]
             Docs: man:rpcbind(8)
         Main PID: 639 (rpcbind)
            Tasks: 1 (limit: 19059)
           Memory: 2.8M
           CGroup: /system.slice/rpcbind.service
                   └─639 /sbin/rpcbind -f -w
      
      Dec 15 10:14:29 office systemd[1]: Starting RPC bind portmap service...
      Dec 15 10:14:29 office systemd[1]: Started RPC bind portmap service.
      [COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#54FFFF][B]~[/B][/COLOR][COLOR=#000000]$ sudo rpcinfo -p[/COLOR]
      [sudo] password for stuart:  
         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  56928  status
          100024    1   tcp  39359  status
          100021    1   udp  46391  nlockmgr
          100021    3   udp  46391  nlockmgr
          100021    4   udp  46391  nlockmgr
          100021    1   tcp  33373  nlockmgr
          100021    3   tcp  33373  nlockmgr
          100021    4   tcp  33373  nlockmgr
      [COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#54FFFF][B]~[/B][/COLOR][COLOR=#000000]$ [/COLOR]
      
      [/FONT]

      Please Read Me

      Comment


        #4
        Thanks oshunluvr. Geez, I've been using nfs since the early sun workstation days! I admit that I've never had to do much more than set up an /etc/exports file on the server and an fstab on the client and things and things just worked. The ONLY thing that has changed on my network is that I did a clean install of kubuntu 20.04 over unbuntu 18.04 on the server. I installed the nfs-server package on the server and setup the exports file. As I mentioned, I have tried this with the ufw disabled as well. The client machines running kubuntu 20.04 connected to the ubuntu 18.04 without a problem. FWIW, I have tried running samba on the server and I am able to connect to it from the client. I see that the ports with nlockmgr don't show up on rpcinfo on my client.

        /etc/exports on the server:
        Code:
        /home/acct          192.168.0.0/24(rw,no_subtree_check,sync)
        /home/fs-shared     192.168.0.0/24(rw,no_subtree_check,sync)
        also have tried:
        Code:
        /home/acct          *(rw,no_subtree_check,sync)
        /home/fs-shared     *(rw,no_subtree_check,sync)
        /etc/fstab on the client:
        Code:
        fs-server:/home/acct      /acct          nfs rw,noauto,intr 0 0
        fs-server:/home/fs-shared /fs-shared     nfs rw,noauto,intr 0 0
        or manually:
        Code:
        [FONT=monospace][COLOR=#000000]sudo mount -v -t nfs 192.168.0.3:/home/acct /acct       [/COLOR]
        mount.nfs: timeout set for Fri Dec 18 11:06:49 2020 
        mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.3,clientaddr=192.168.0.17' 
        mount.nfs: mount(2): Connection refused 
        mount.nfs: trying text-based options 'addr=192.168.0.3' 
        mount.nfs: prog 100003, trying vers=3, prot=6 
        mount.nfs: portmap query retrying: RPC: Unable to receive
        ...
        
        [/FONT]
        server:
        Code:
        [FONT=monospace][FONT=monospace][COLOR=#000000]rpcinfo -p localhost [/COLOR]
          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 
           100005    1   udp  38327  mountd 
           100005    1   tcp  40835  mountd 
           100005    2   udp  44929  mountd 
           100005    2   tcp  49009  mountd 
           100005    3   udp  42665  mountd 
           100005    3   tcp  49271  mountd 
           100003    3   tcp   2049  nfs 
           100003    4   tcp   2049  nfs 
           100227    3   tcp   2049 
           100003    3   udp   2049  nfs 
           100227    3   udp   2049 
           100021    1   udp  48909  nlockmgr 
           100021    3   udp  48909  nlockmgr 
           100021    4   udp  48909  nlockmgr 
           100021    1   tcp  44203  nlockmgr 
           100021    3   tcp  44203  nlockmgr 
           100021    4   tcp  44203  nlockmgr
        
        [FONT=monospace][COLOR=#54FF54][B]george@fs-server[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ systemctl status rpcbind [/COLOR]
        [COLOR=#54FF54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.service - RPC bind portmap service [/COLOR]
            Loaded: loaded (/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled) 
            Active: [COLOR=#54FF54][B]active (running)[/B][/COLOR][COLOR=#000000] since Thu 2020-12-17 21:31:58 PST; 13h ago [/COLOR]
        TriggeredBy: [COLOR=#54FF54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.socket [/COLOR]
              Docs: man:rpcbind(8) 
          Main PID: 620 (rpcbind) 
             Tasks: 1 (limit: 13916) 
            Memory: 2.1M 
            CGroup: /system.slice/rpcbind.service 
                    └─620 /sbin/rpcbind -f -w 
        
        Dec 17 21:31:58 fs-server systemd[1]: Starting RPC bind portmap service... 
        Dec 17 21:31:58 fs-server systemd[1]: Started RPC bind portmap service.
        [/FONT][/FONT][/FONT]
        client:
        Code:
        [FONT=monospace][COLOR=#54ff54][B]gkhouri@bud[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ systemctl status rpcbind [/COLOR]
        [COLOR=#54ff54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.service - RPC bind portmap service [/COLOR]
            Loaded: loaded (/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled) 
            Active: [COLOR=#54ff54][B]active (running)[/B][/COLOR][COLOR=#000000] since Tue 2020-12-15 20:30:33 PST; 2 days ago [/COLOR]
        TriggeredBy: [COLOR=#54ff54][B]●[/B][/COLOR][COLOR=#000000] rpcbind.socket [/COLOR]
              Docs: man:rpcbind(8) 
          Main PID: 599 (rpcbind) 
             Tasks: 1 (limit: 18895) 
            Memory: 2.2M 
            CGroup: /system.slice/rpcbind.service 
                    └─599 /sbin/rpcbind -f -w 
        
        Dec 15 20:30:33 bud systemd[1]: Starting RPC bind portmap service... 
        Dec 15 20:30:33 bud systemd[1]: Started RPC bind portmap service.
        
        [FONT=monospace][COLOR=#54ff54][B]gkhouri@bud[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo rpcinfo -p [/COLOR]
          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  32876  status 
           100024    1   tcp  41521  status
        
        [/FONT][/FONT]

        Comment


          #5
          SOLVED??
          Apologies for the trouble. There still exists some mystery, but I removed the static ip setting from the kubuntu server and let my router assign an ip address to the server, and everything works as would normally be expected. I kept the same ip address as before the upgrade and couldn't export. This is clearly a different issue than not being able to serve files via nfs on kubuntu 20.04. Probably I made some mistake in the kubuntu system settings assigning an ip address.

          Comment


            #6
            Wow, odd but great you solved it. I was guessing the issue was in your exports/mounts because NFSv4 uses different options than NFSv3. I assumed maybe you had the two versions battling each other.

            I've never tried using system settings to set IPs. I always did it the old fashioned way. Nowadays *buntus are using netplan which is a whole new animal, ifup/ifdown aren't installed by default. I use networkd as the renderer (a netplan "thing") on my desktop top but had to revert to NetworkManager on my server because I use a VPN on it and configuring it without NetworkManager was not trival. So much so I gave up and installed NM. Now I am having all sorts of trouble with NM and dhcpdiscover wanting to configure the second ethernet and wifi ports which I don't use. Right now, I have to kill dhcpdiscover and down the other NIC and WiFi manually after a reboot. PITA. NM also is slow at boot time, but whoop-de-do I hardly reboot anyway so it's not a concern.

            Just for fun; here's my mounts and exports:
            Mounts:
            Code:
            stuart@office:/subvol$ cat /etc/fstab |grep server
            server:/                                  /shared          nfs   nofail,x-systemd.automount,x-systemd-device-timeout=10,_netdev,bg,hard,timeo=28,retrans=5,intr,noatime,nodiratime 0 0
            server:/private                           /mnt/private     nfs   nofail,x-systemd.automount,x-systemd-device-timeout=10,_netdev,bg,hard,timeo=28,retrans=5,intr,noatime,nodiratime 0 0
            Exports:
            Code:
            [FONT=monospace][COLOR=#54FF54][B]smith@server[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ cat /etc/exports[/COLOR]
            # Example for NFSv2 and NFSv3:
            # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
            #
            # Example for NFSv4:
            # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
            # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
            #
            /exports 192.168.1.0/24(rw,fsid=0,crossmnt,no_subtree_check,sync,secure,nohide,all_squash,anonuid=65534,anongid=560)
            /private 192.168.1.0/24(rw,fsid=1,crossmnt,no_subtree_check,sync,secure,nohide,no_root_squash)
            [/FONT]
            So you can see mine use NFSv4. It has a few advantages like exporting all the folders under the main mounts.

            Please Read Me

            Comment

            Working...
            X