12

I want to set up a filesharing server with NFS. But when I want to show the conetnts of export I get this:

manuel@server ~ $ showmount
clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)

What is wrong with it?

3 Answers3

18

Horribly. I read about 5 Tutorials, but none of them mentioned that the service rpcbind is needed.

For Debian

sudo service rpcbind start

does the trick.

1

Do the following:

vi /etc/sysconfig/iptables
  1. Remove the reject entry
  2. Remove the forward entry
  3. Save

From the command-line, type:

 iptables -I INPUT -p tcp --dport 111 -j ACCEPT
 iptables -I INPUT -p tcp --dport 2049 -j ACCEPT
 /etc/init.d/iptables save

Restart the rpcbind service.

Run showmount -e ipaddress where "ipaddress" is the IP of your NFS server.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Reggie
  • 11
  • I have a server with three different interfaces. Only one of which is allowed the rpcbind action.

    showmount -e yielded the same error as shown by the original poster.

    A slight modification, based upon the above, results in a command returning expected results: showmount -e 127.0.0.1. This forces to the local host, rather than one of the other interfaces.

    – Raymond Burkholder Apr 23 '15 at 18:43
  • Do you change the iptables on the nfs server or client? – Jim Sep 19 '17 at 23:51
0

I know this is old but I hope this will help other people. This is for Red Hat.

showmount -e server_address
clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)

Doing this produced a new error.

/sbin/service rpcbind start
showmount -e server_address
clnt_create: RPC: Port mapper failure - Authentication error

This was the fix that got everything to work.

/sbin/service autofs restart
cokedude
  • 1,121