Problemi di condivisione della cartella tramite NFS - RPC: impossibile inviare; errno = Bad file descriptor o Program not registered

1

Uso Mac OS High Sierra 10.13 e sto affrontando alcuni problemi che condividono una cartella tramite NFS.

La configurazione:

Il firewall integrato è disabilitato e non è installato alcun firewall di terze parti.

  1. Mi sono assicurato che il servizio nfs sia abilitato :

    $ sudo nfsd enable
    

    The nfsd service is already enabled.

  2. Mi sono assicurato che il servizio nfs sia in esecuzione :

    $ sudo nfsd start
    

    The nfsd service is already running.

  3. Ho controllato con nmap per vedere le porte ascoltate:

    $ nmap localhost
    
            
    Starting Nmap 7.60 ( https://nmap.org ) at 2017-10-17 21:53 CEST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00034s latency).
    Other addresses for localhost (not scanned): ::1 10.101.97.98
    Not shown: 995 filtered ports
    PORT     STATE SERVICE
    80/tcp   open  http
    111/tcp  open  rpcbind
    1021/tcp open  exp1
    1023/tcp open  netvenuechat
    2049/tcp open  nfs
    
    
    Nmap done: 1 IP address (1 host up) scanned in 4.34 seconds
    
  4. rpcinfo

    $ rpcinfo -p
    
    program vers proto   port
    100000    2   udp    111  rpcbind 
    100000    3   udp    111  rpcbind 
    100000    4   udp    111  rpcbind 
    100000    2   tcp    111  rpcbind 
    100000    3   tcp    111  rpcbind 
    100000    4   tcp    111  rpcbind 
    100024    1   udp    612  status 
    100024    1   tcp   1021  status 
    100021    0   udp    843  nlockmgr 
    100021    1   udp    843  nlockmgr 
    100021    3   udp    843  nlockmgr 
    100021    4   udp    843  nlockmgr 
    100021    0   tcp   1017  nlockmgr 
    100021    1   tcp   1017  nlockmgr 
    100021    3   tcp   1017  nlockmgr 
    100021    4   tcp   1017  nlockmgr 
  5. Verifica la connessione a nfs

    $ telnet localhost 2049
    

    Trying ::1... Connected to localhost. Escape character is '^]'.

  6. Crea cartella da condividere

    $ mkdir -p ~/tmp/shared-test
    $ touch ~/tmp/shared-test/works.txt
    
  7. Aggiungilo a / etc / exports

    $ sudo echo "/Users/user/tmp/shared-test -mapall=-2:-2 -ro" >> /etc/exports
    $ sudo chmod 640 /etc/exports
    
  8. Assicurati che / etc / exports sia corretto

    $ sudo nfsd checkexports
    

Il problema:

$ showmount -e
showmount: Cannot retrieve info from host: localhost: RPC failed:: RPC: Unable to send; errno = Bad file descriptor
$ syslog
Oct 17 21:56:28 Estebans-MacBook-Pro-2 rpc.lockd[215] : can't contact statd, 100024 RPC: Timed out
--- last message repeated 2 times ---
Oct 17 21:58:29 Estebans-MacBook-Pro-2 syslogd[43] : ASL Sender Statistics
Oct 17 21:59:31 Estebans-MacBook-Pro-2 rpc.lockd[215] : can't contact statd, 100024 RPC: Timed out
Oct 17 22:00:19 Estebans-MacBook-Pro-2 login[1328] : USER_PROCESS: 1328 ttys002
Oct 17 22:00:33 Estebans-MacBook-Pro-2 rpc.lockd[215] : can't contact statd, 100024 RPC: Timed out

Riesco a vedere rpc.lockd [215]: impossibile contattare statd, 100024 RPC: scaduto dappertutto, come registro ricorrente.

$ showmount 127.0.0.1
showmount: Cannot retrieve info from host: 127.0.0.1: RPC: Program not registered
    
posta kiwi 17.10.2017 - 22:47
fonte

1 risposta

1

A quanto pare, ho avuto alcuni problemi con il mio file / etc / hosts. Il sospetto era allerta vedendo rpc.lockd [215]: impossibile contattare statd, 100024 RPC: scaduto dappertutto.

Ho ripulito il file / etc / hosts:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

Riavviato il servizio sudo nfsd restart

E infine quando si fa showmount -e localhost : Exports list on localhost: /Users/kiwi/user/shared-test Everyone

rpcinfo -p

   program vers proto   port
    100000    2   udp    111  rpcbind
    100000    3   udp    111  rpcbind
    100000    4   udp    111  rpcbind
    100000    2   tcp    111  rpcbind
    100000    3   tcp    111  rpcbind
    100000    4   tcp    111  rpcbind
    100024    1   udp    906  status
    100024    1   tcp   1021  status
    100021    0   udp    730  nlockmgr
    100021    1   udp    730  nlockmgr
    100021    3   udp    730  nlockmgr
    100021    4   udp    730  nlockmgr
    100021    0   tcp   1017  nlockmgr
    100021    1   tcp   1017  nlockmgr
    100021    3   tcp   1017  nlockmgr
    100021    4   tcp   1017  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp    989  mountd
    100005    3   udp    989  mountd
    100005    1   tcp   1023  mountd
    100005    3   tcp   1023  mountd
    100011    1   udp    636  rquotad
    100011    2   udp    636  rquotad
    100011    1   tcp    999  rquotad
    100011    2   tcp    999  rquotad
    
risposta data 21.10.2017 - 21:16
fonte

Leggi altre domande sui tag