LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RPC: failed to contact portmap (errno -5) (https://www.linuxquestions.org/questions/linux-newbie-8/rpc-failed-to-contact-portmap-errno-5-a-702845/)

alirezan1 02-06-2009 06:28 PM

RPC: failed to contact portmap (errno -5)
 
Hello,

I have NFS 4 running on my server and everything works just fine. I can mount shares from my clients and read/write to NFS shares and all that. Though, everytime I start NFS, I get:

RPC: failed to contact portmap (errno -5).

Nothing seems to be failing because NFS starts fine and all the services are up and running.

I have no /etc/hosts.allow or .deny and I have no iptables or any sort of firewall. It is a pretty isolated network.

Does anybody know how I can stop this error message from being displayed?

Thanks

kenneho 02-09-2009 06:36 AM

Hi.

I've your only looking for a way to disable the error message, I guess you could pipe the std err output to dev null like this "service nfs start 2>/dev/null". Or you can even add the piping to the script itself.

But why NFS works when portmap doesn't I don't understand. What does "service nfs status" and "service portmap status" show?

alirezan1 02-09-2009 12:40 PM

Quote:

Originally Posted by kenneho (Post 3437065)
Hi.

I've your only looking for a way to disable the error message, I guess you could pipe the std err output to dev null like this "service nfs start 2>/dev/null". Or you can even add the piping to the script itself.

But why NFS works when portmap doesn't I don't understand. What does "service nfs status" and "service portmap status" show?

I tried piping, but this error still shows up!
That is a good question. Here's the status from portmap and nfs:

> /etc/init.d/nfs status
rpc.mountd is stopped
nfsd is stopped
> /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[ OK ]
Starting NFS mountd: [ OK ]
> /etc/init.d/nfs status
rpc.mountd (pid 2276) is running...
nfsd (pid 2272 2271 2270 2269 2268 2267 2266 2265) is running...
> /etc/init.d/portmap status
portmap (pid 1707) is running...
> /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: nfsd: last server has exited
nfsd: unexporting all filesystems
RPC: failed to contact portmap (errno -5).
[ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS daemon: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[ OK ]
Starting NFS mountd: [ OK ]
> /etc/init.d/nfs status
rpc.mountd (pid 2351) is running...
nfsd (pid 2347 2346 2345 2344 2343 2342 2341 2340) is running...

kenneho 02-13-2009 04:42 AM

Do you still get the error message even if your running "service nfs start 2>/dev/null"?

alirezan1 02-13-2009 11:25 AM

Quote:

Originally Posted by kenneho (Post 3442055)
Do you still get the error message even if your running "service nfs start 2>/dev/null"?


Yes I do! Do you have a solution?

Thanks

kenneho 02-16-2009 07:34 AM

What happens if you do this? "service nfs start &>/dev/null"

alirezan1 02-16-2009 12:47 PM

Quote:

Originally Posted by kenneho (Post 3445461)
What happens if you do this? "service nfs start &>/dev/null"

$ service nfs restart &>/dev/null
nfsd: last server has exited
nfsd: unexporting all filesystems
RPC: failed to contact portmap (errno -5).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period

kenneho 02-17-2009 01:51 AM

Really? This seems very strange. That command pipes both std out and std err to /dev/null, so you shouldn't get any output at all.

Which shell are you using?

alirezan1 02-17-2009 01:55 PM

Quote:

Originally Posted by kenneho (Post 3446504)
Really? This seems very strange. That command pipes both std out and std err to /dev/null, so you shouldn't get any output at all.

Which shell are you using?

haha I know!!!! It's strange and disturbing at the same time! I'm using bash...

kenneho 02-18-2009 02:27 AM

If you have some linux support tech line to call I'd surely make that call now. :)


All times are GMT -5. The time now is 12:56 AM.