NFS mounting problems: "RPC Error: Program not registered"
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 15 of 15
  1. #1
    tornadof3 Guest

    NFS mounting problems: "RPC Error: Program not registered"

    I am trying to mount an NFS share on a client machine. This fails with the error that the program is not registered (on the server). This fails with or without firewall running on the server. Ports 111 and 2049 are open. /etc/hosts.allow in the server has

    portmap: 10.0.0.0
    nfslockd: 10.0.0.0
    statd: 10.0.0.0

    From the client, all services work perfectly; DNS is fine, everything else is great. When I run "rpcinfo -p" on the server, it shows that all the required services should be running ok. "rpcinfo -p serveraddress" on the client yields "can't contact portmapper: RPC: unknown host". How on earth do I fix this problem so I can mount my shares??!

  2. #2
    Join Date
    Jan 2008
    Location
    N/A
    Posts
    2,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A very tricky error You don't know if this is a network issue or services issue.

    Firstly are you able to ping the NFS server from your client machine? (Well kinda obvious, but have to ask)

    Please post /etc/exports of your NFS server.

    showmount -e (nfs server ip) on the client machine of course

    exportfs -a (on the nfs server)

    nmap localhost (on the server)

    Please post the output of the above.

    on the client /etc/hosts.allow add

    nfs: 10........... (or maybe its nfsd, try both)

  3. #3
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i had that the other day out of the blue and i'm not sure how i fixed it as it doesn't happen now, i haven't done a yum update so its not as if thats fixed a broken package.

    i think it must have been something to do with the order i started the services in - start rpcbind first, then nfs (which starts all the rpcidmapd, rpcgssd, nfslock etc. services itself).

    try commenting out everything in /etc/hosts.allow and hosts.deny in case you're getting tcpwrapped, you've already looked at iptables so thats not it.

    "nmap localhost" won't be much use, "netstat -plntu" would be better.

    have you got the server hostname in the client's /etc/hosts - or are you using an ip address in the mount command?

  4. #4
    tornadof3 Guest
    showmount -e 10.0.0.1 {ip of server} :

    Code:
    mount clntudp_create: RPC: Program not registered
    /etc/exports on server:

    Code:
    /home             *(rw,insecure,sync,no_wdelay)
    on server; nmap localhost:
    Code:
    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-04-26 12:56 BST
    Interesting ports on serveraddress.domain (127.0.0.1):
    Not shown: 1656 closed ports
    PORT      STATE SERVICE
    22/tcp    open  ssh
    25/tcp    open  smtp
    53/tcp    open  domain
    80/tcp    open  http
    110/tcp   open  pop3
    111/tcp   open  rpcbind
    139/tcp   open  netbios-ssn
    143/tcp   open  imap
    389/tcp   open  ldap
    443/tcp   open  https
    445/tcp   open  microsoft-ds
    617/tcp   open  sco-dtmgr
    631/tcp   open  ipp
    689/tcp   open  unknown
    783/tcp   open  spamassassin
    953/tcp   open  rndc
    993/tcp   open  imaps
    995/tcp   open  pop3s
    1006/tcp  open  unknown
    2049/tcp  open  nfs
    3306/tcp  open  mysql
    6000/tcp  open  X11
    8443/tcp  open  https-alt
    10000/tcp open  snet-sensor-mgmt
    
    Nmap finished: 1 IP address (1 host up) scanned in 0.089 seconds
    on server: netstat -plntu:
    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
    tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      2416/hpiod          
    tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN      2741/dovecot        
    tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN      -                   
    tcp        0      0 0.0.0.0:995                 0.0.0.0:*                   LISTEN      2741/dovecot        
    tcp        0      0 0.0.0.0:389                 0.0.0.0:*                   LISTEN      2350/slapd          
    tcp        0      0 0.0.0.0:617                 0.0.0.0:*                   LISTEN      2558/rpc.mountd     
    tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      2688/mysqld         
    tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      2920/smbd           
    tcp        0      0 0.0.0.0:51117               0.0.0.0:*                   LISTEN      -                   
    tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN      2741/dovecot        
    tcp        0      0 0.0.0.0:1006                0.0.0.0:*                   LISTEN      2524/rpc.rquotad    
    tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN      2777/spamd.pid      
    tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      2741/dovecot        
    tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      2159/portmap        
    tcp        0      0 0.0.0.0:6000                0.0.0.0:*                   LISTEN      4697/X              
    tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN      4554/perl           
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      2843/httpd          
    tcp        0      0 0.0.0.0:689                 0.0.0.0:*                   LISTEN      2203/rpc.statd      
    tcp        0      0 86.12.124.191:53            0.0.0.0:*                   LISTEN      2126/named          
    tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      2126/named          
    tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2443/sshd           
    tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2459/cupsd          
    tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      2806/sendmail: acce 
    tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN      2126/named          
    tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      2843/httpd          
    tcp        0      0 0.0.0.0:8443                0.0.0.0:*                   LISTEN      2843/httpd          
    tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      2920/smbd           
    tcp        0      0 0.0.0.0:7741                0.0.0.0:*                   LISTEN      2962/lisa           
    tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN      2421/python         
    udp        0      0 0.0.0.0:32768               0.0.0.0:*                               2126/named          
    udp        0      0 0.0.0.0:2049                0.0.0.0:*                               -                   
    udp        0      0 0.0.0.0:32770               0.0.0.0:*                               -                   
    udp        0      0 0.0.0.0:32772               0.0.0.0:*                               3044/avahi-daemon:  
    udp        0      0 10.0.0.1:137                0.0.0.0:*                               2923/nmbd           
    udp        0      0 86.12.124.191:137           0.0.0.0:*                               2923/nmbd           
    udp        0      0 0.0.0.0:137                 0.0.0.0:*                               2923/nmbd           
    udp        0      0 10.0.0.1:138                0.0.0.0:*                               2923/nmbd           
    udp        0      0 86.12.124.191:138           0.0.0.0:*                               2923/nmbd           
    udp        0      0 0.0.0.0:138                 0.0.0.0:*                               2923/nmbd           
    udp        0      0 0.0.0.0:10000               0.0.0.0:*                               4554/perl           
    udp        0      0 0.0.0.0:683                 0.0.0.0:*                               2203/rpc.statd      
    udp        0      0 0.0.0.0:686                 0.0.0.0:*                               2203/rpc.statd      
    udp        0      0 86.12.124.191:53            0.0.0.0:*                               2126/named          
    udp        0      0 127.0.0.1:53                0.0.0.0:*                               2126/named          
    udp        0      0 0.0.0.0:7741                0.0.0.0:*                               2962/lisa           
    udp        0      0 0.0.0.0:67                  0.0.0.0:*                               4522/dhcpd          
    udp        0      0 0.0.0.0:68                  0.0.0.0:*                               3734/dhclient       
    udp        0      0 0.0.0.0:614                 0.0.0.0:*                               2558/rpc.mountd     
    udp        0      0 0.0.0.0:5353                0.0.0.0:*                               3044/avahi-daemon:  
    udp        0      0 0.0.0.0:1003                0.0.0.0:*                               2524/rpc.rquotad    
    udp        0      0 0.0.0.0:111                 0.0.0.0:*                               2159/portmap        
    udp        0      0 0.0.0.0:631                 0.0.0.0:*                               2459/cupsd          
    udp        0      0 86.12.124.191:123           0.0.0.0:*                               2480/ntpd           
    udp        0      0 127.0.0.1:123               0.0.0.0:*                               2480/ntpd           
    udp        0      0 0.0.0.0:123                 0.0.0.0:*                               2480/ntpd
    I can ping the server no problem and all other network services work fine (eg LDAP, HTTPD etc)

    Any help much appreciated, thanks for input so far!

  5. #5
    Join Date
    Jan 2008
    Location
    N/A
    Posts
    2,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello I'm afraid I don't recall how I resolved this issue when I faced it. I was using RHEL 4 and I tried restarting

    portmap
    netfs
    nfs

    Services in that order (I don't recall if I restarted them on the client or server)

    Also I think your /etc/exports would be better with the Network defined than with global *

    Code:
    /home             10.0.0.0(rw,insecure,sync,no_wdelay)

  6. #6
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by notageek
    Hello I'm afraid I don't recall how I resolved this issue when I faced it. I was using RHEL 4 and I tried restarting

    portmap
    netfs
    nfs

    Services in that order (I don't recall if I restarted them on the client or server)

    Also I think your /etc/exports would be better with the Network defined than with global *

    Code:
    /home             10.0.0.0(rw,insecure,sync,no_wdelay)
    same here - i think i solved it by the order i started the services.

    and yes i think defining the network is better - although don't you need /24 or something on the end there? and the insecure bit i needed to make macosx like it.

  7. #7
    Join Date
    Jan 2008
    Location
    N/A
    Posts
    2,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you need a /24 or /(network bit) or /(Network Mask).

    Thanks for reminding me.

  8. #8
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just confirmed with f9-preview as client, you have to start rpcbind before nfs (on the f7 server) and you need rpcbind and nfslock on the client too.

  9. #9
    tornadof3 Guest
    Hmm ok I've made the changes to /etc/exports. Does it matter this is a Centos 5.1 server? What is this "rpcbind" program - I don't seem to have this installed? service rpcbind start does not work - could this be a problem?

  10. #10
    Join Date
    Jan 2008
    Location
    N/A
    Posts
    2,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I recall, rpcbind and all rpc related services are started by portmap (do you have that?)

    "rpcinfo -p serveraddress" on the client yields "can't contact portmapper: RPC: unknown host".
    Your original post is interesting, is portmap running on the client?

    Edit:

    From your Nmap on localhost on your server I see that rpcbind is running

    Code:
    111/tcp   open  rpcbind
    I suspect its an issue with the client, are you able to mount from other clients?
    Last edited by notageek; 27th April 2008 at 06:32 PM.

  11. #11
    tornadof3 Guest
    Well, by playing around with the services running and fiddling a whole load of other things that I can't even recall, I now seem to have it working, so I will make a backup of config files and save them for a bad day.

    However, I can only mount with firewall switched off. With firewall enabled, even with port 111 and 2049 open, it won't mount. Does anyone have any hot tips for configuring NFS to work through a firewall. I'm using Firestarter as the configurator. Who'd have thought a simple NFS server would cause so much trouble?!

    Many thanks to everyone who's posted to help

  12. #12
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you have a firewall you have to define which ports to listen on - because nfs uses ports 111/2049, plus some other dynamic ports. its under server settings in system-config-nfs

    can't you just allow all from a certain ip, it would be easier, especially as its just on the lan, not wan.

  13. #13
    tornadof3 Guest
    As suggested by user "Brian1" on another forum, the following guide fixed this problem: http://www.linuxquestions.org/questi...e-open-294069/

    It basically fixes which ports NFS uses and then you can open them on a firewall; very helpful

  14. #14
    Join Date
    Jan 2014
    Location
    india
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: NFS mounting problems: "RPC Error: Program not registered"

    Hi,


    this is generated due to order of services on server
    start /restart rpcbind service before nfs.

    On client it is generated due to port block on nfs server

    I don't know whether it would in fedora or not but in RHEL6 it worked fine for me.

    Configure NFS on RHEL6 Step by step

  15. #15
    Join Date
    Aug 2009
    Posts
    8,586
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: NFS mounting problems: "RPC Error: Program not registered"

    Closing this one up.

    This thread was almost 6 years old, and quite a lot has changed in nfs since then, so it's not longer applicable anyway.

Similar Threads

  1. Replies: 0
    Last Post: 30th July 2009, 10:27 PM
  2. Replies: 9
    Last Post: 11th December 2008, 02:51 AM
  3. Replies: 0
    Last Post: 23rd May 2005, 04:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •