9

Last week I was using RPC and could run my RPC server program just fine. However, today I tried to start it again and I am getting this error:

Cannot register service: RPC: Authentication error; why = Client credential too weak unable to register (X_PROG, X_VERS, udp)

Can anybody tell me what the cause of this error can be?

rpcinfo gives me this:

   program version netid     address                service    owner
    100000    4    tcp6      ::.0.111               portmapper superuser
    100000    3    tcp6      ::.0.111               portmapper superuser
    100000    4    udp6      ::.0.111               portmapper superuser
    100000    3    udp6      ::.0.111               portmapper superuser
    100000    4    tcp       0.0.0.0.0.111          portmapper superuser
    100000    3    tcp       0.0.0.0.0.111          portmapper superuser
    100000    2    tcp       0.0.0.0.0.111          portmapper superuser
    100000    4    udp       0.0.0.0.0.111          portmapper superuser
    100000    3    udp       0.0.0.0.0.111          portmapper superuser
    100000    2    udp       0.0.0.0.0.111          portmapper superuser
    100000    4    local     /run/rpcbind.sock      portmapper superuser
    100000    3    local     /run/rpcbind.sock      portmapper superuser

The weird thing is that I haven't even been using this pc the past week. Are there any services that should be running?

Hope you can help me out. Grtz Stefan

9 Answers 9

15

this error is linked to rpcbind,so you should stop service portmap like this:

sudo -i service portmap stop

then

sudo -i rpcbind -i -w

at end start service portmap:

sudo -i service portmap start
1
  • 2
    It might be worth mentioning -i is “Insecure” mode and therefore allows any host to make RPCs to registered programs. (From the manual: "Normally rpcbind accepts these requests only from the loopback interface for security reasons. This change is necessary for programs that were compiled with earlier versions of the rpc library and do not make those requests using the loopback interface.")
    – eregon
    Oct 23, 2013 at 13:12
4

I realize this is an older thread, but Google finds it among the top 3 results and people are still discovering the nfs service error. Even Red Hat's RHN's fix didn't work.

As of December 2013 on a RHEL 6.4 (x64), and patched as of November 2013, the only solution was changing the permissions on the tcp_wrapper config files. Because we had secured the box pretty heavily, we had permissions of 640 on /etc/hosts.allow and /etc/hosts.deny, both owned by root:root. We did try given these files different group ownership nothing corrected the issue when nfs started.

Once we put the perms back to "out-of-the-box" (644) the nfs (rquotad) service started up as expected. Or if we moved the hosts.allow/deny out of the way entirely.

What a pain that was to figure out. The selinux logs may have helped if I had looked sooner.

Now if we had left selinux in enforcing mode this MAY have not been an issue. I still have to test that theory.

Good luck.

3

Making the change persistent on Ubuntu12.04 (assuming security implications of running rpcbind with -i are irrelevant):

echo 'OPTIONS="-w -i"' | sudo tee /etc/default/rpcbind
sudo service portmap restart
3

Yet Another Solution: CentOS 7.3 edition

In addition to rpcbind, I also had to allow mountd in /etc/hosts.allow:

rpcbind : ALL : allow
mountd : ALL : allow

This finally allowed me to not only execute rpcinfo, but showmount and mount as well.

0

None of the solutions presented here so far worked for me on the Debian Squeeze to Wheezy upgrade.

In my case the sole thing I had to do was to replace all occurrences of "portmapper" (or "portmap", no more sure) in /etc/hosts.allow with "rpcbind". That was all. (Otherwise ypbind couldn't connect to rpcbind via localhost.)

0

This also happens if iptables is used and it is blocking UDP connections for localhost. Ran into this today. Stopped iptables, connections started working.

You will need to figure out the rules that broke it.

0

I think that it is worth mentioning that if you see errors like:

0-rpc-service: Could not register with portmap

it can be related to hosts.allow and hosts.deny files set and lacking permissions for localhost in the hosts.allow file.

I had this kind of problem with setting NFS with GlusterFS.

In my /etc/hosts.allow file I have added:

ALL: 127.0.0.1 : ALLOW

and problem with registering service with portmap went away and everything is working.

Note: with GlusterFS remember to restart the glusterd service

/etc/init.d/glusterd restart
0

I was receiving an error like so on rhel7:

ypserv: Cannot register service: RPC: Authentication error; why = Client credential too weak  

when starting ypbind. I tried everything including the '-i' to rpcbind above. In the end as XTaran mentioned modifying /etc/hosts. allow adding this line:

rpcbind: 127.0.0.1 

worked for me.

0

FWIW, here's an 'alternative' solution.

  1. Check the /etc/hosts.deny file. It should say something like:
  2. rpcbind mountd nfsd statd lockd rquotad : ALL
  3. Ensure that there is a blank last line in this file.
  4. Check the /etc/hosts.allow file. It should say something like:
  5. rpcbind mountd nfsd statd lockd rquotad: 127.0.0.1 192.168.1.100
  6. Ensure that there is a blank last line in this file.

The "trick" (for me) was the blank final line in the file(s).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.