Wednesday, April 6, 2011

svc: failed to register lockdv1 RPC service (errno 97). lockd: cannot monitor

Alright, you have searched the internet in and out, up and down, plough through the forums and read all the available man pages on earth regarding NFS and still did not find answer you longed for, because they are not directly available/described/discussed whatever it might be. Well, this might help you.

Good thing about linux is that it keeps you at your toes.

When mounting a NFS directory, you might see this error in your /var/log/messages trace.

Apr  1 09:10:45 orasoa1 kernel: [  895.012894] svc: failed to register lockdv1 RPC service (errno 97).
Apr  1 09:25:31 orasoa1 kernel: [ 1778.601154] svc: failed to register lockdv1 RPC service (errno 97).

Or when acquiring a file lock either by some applications, Oracle SOA Admin Server for example, or when simply trying to manually acquire an exclusive lock of a file on NFS.

$flock lockfile -c 'vi dosomeactivities'

You might see these errors.

Apr  1 09:25:57 orasoa1 kernel: [ 1804.313073] lockd: cannot monitor 192.168.50.100
Apr  1 09:33:59 orasoa1 kernel: [ 2285.828349] lockd: cannot monitor 192.168.50.100
Apr  1 09:36:39 orasoa1 kernel: [ 2444.869671] lockd: cannot monitor 192.168.50.100

where "192.168.50.100" is the NAS server IP address (the 'openfiler1' host).

It is probably because you don't have a DNS for your host names or simply because you haven't updated your /etc/hosts file to include the name of your NAS server.

Try this if you had similar problem, I hope it saves your precious time.

On your client host(s), stick this line into your /etc/hosts file(s)

#vi /etc/hosts

nas_server_ip_addr nas_sever_hostname #example 192.168.50.100    openfiler1
nas_client_ip_addr nas_client_hostname     #example 172.16.20.50      orasoa1

Cheers,

4 comments:

  1. Ubuntu 10.10 64 bit:
    dpkg-reconfigure portmap
    select that portmap should *not* listen to 127.0.0.1
    restart portmap. problem solved!

    ReplyDelete
  2. Thanks for the helpful comment. I had no idea dns was involved when only using ip addresses in my commands!

    ReplyDelete
  3. I had a similar problem here and I solved that installing dnsmasq which is a DNS Cache server (for small purposes).

    Install it on the server I forget this problem :)

    ReplyDelete
  4. Thanks Abel. Keep the comments coming as I've no doubt it has helped others.

    ReplyDelete