Rstatd

From KeegansWiki
Revision as of 09:31, 22 April 2010 by Keegan (talk | contribs) (Created page with '==Error== /etc/init.d/rstatd start Starting rstat services: Cannot register service: RPC: Unable to receive; errno = Connection refused ==Mitigation== This one was a major pain …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Error

/etc/init.d/rstatd start Starting rstat services: Cannot register service: RPC: Unable to receive; errno = Connection refused

Mitigation

This one was a major pain to figure out. I thought for a long time that ti was an SELinux problem because of this:

[root@localhost ~]# strace /etc/init.d/rstatd start
...
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat("/etc/sysconfig/network", {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
access("/etc/sysconfig/network", X_OK)  = -1 EACCES (Permission denied)
access("/etc/sysconfig/network", R_OK)  = 0
open("/etc/sysconfig/network", O_RDONLY) = 3
...

Turns out, that wasn't it, disabling selinux didn't change the error message. I happened to see this error in /var/log/messages every time I tried to start rstatd:

Apr 22 05:19:07 localhost rpc.rstatd[17227]: unable to register (RSTATPROG, RSTATVERS_USERS, udp).

After a bunch of googling, I found the issue was related to portmap. If you look at the man page for portmap you'll see this line:

Portmap is a server that converts RPC program numbers into DARPA protocol port numbers.  It must be running in order to make RPC calls.

So, the solution was to simply run 'portmap' (or start it via the service command.) Rstatd ran just fine after that.