Linux Tips

Portmap Error: Unable to receive; errno = Connection reset by peer

_

While setting and configuring NFS share on a server when you try to restart portmap service you get following error

[root@server mounted]# service portmap restart
pmap_getmaps rpc problem: RPC: Unable to receive; errno = Connection reset by peer
Stopping portmap:                                          [FAILED]
Starting portmap:                                          [  OK  ]
[root@server mounted]#

Logs (tail -f /var/log/message) shows that portmap port is conflicting with some other service.

Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use

 

I have searched on internet and found following commands which fixed the issue.

1) Stop portsentry service

[root@server mounted]# /etc/init.d/portsentry stop

2) Restart portmap service

[root@server mounted]# /etc/init.d/portmap restart

3) Start portsentry service

[root@server mounted]# /etc/init.d/portsentry start

Try to configure NFS now :)

_

1 Comment

  1. Rupesh kolatwar

    on Debian Linux i am getting below error while running showmount command, guys is there any workaround for this error.

    RPC: failed to contact portmap (errno -5)
    qa-vm2:~# showmount
    mount clntudp_create: RPC: Port mapper failure – RPC: Unable to receive
    qa-vm2:~#

    qa-vm2:~#tail -f /var/log/messages
    Mar 19 03:33:15 qa-vm2 kernel: NFSD: starting 90-second grace period
    Mar 19 03:39:22 qa-vm2 kernel: nfsd: last server has exited
    Mar 19 03:39:22 qa-vm2 kernel: nfsd: unexporting all filesystems
    Mar 19 03:39:22 qa-vm2 kernel: RPC: failed to contact portmap (errno -5).
    Mar 19 03:39:23 qa-vm2 kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory

Leave a Reply