With the current kernel and glibc combination (kernel 2.2.17 / glibc
2.2-12), rpc.statd does not work. It logs "gethostbyname error" messages
when looking up its own host name. The resolver appears to be trying to
look in /etc/hosts and fails when this inaccessible due to the chrooting of
rpc.statd. A second problem is that rpc.statd logs messages to systlog in
UTC instead of the local timezone, presumably due to the inaccessibility of
There is a line in the statd.c source file which indicates that this was a
and a fix was attempted by calling sethostent(1) before chrooting:
/* Arm the ****** resolver before chroot() so it doesn't fail
* trying to open /etc/* for the dozenth time
However, this fix no longer works with the current kernel / glibc
combination (at least not on our systems). It also doesn't address the
problem with the incorrect times in the system log.
We have temporarily worked around the problem by creating a directory
/var/lib/nfs/statd/etc and putting copies of /etc/resolv.conf, /etc/hosts,
and /etc/localtime there. This fixes both of the above-mentioned problems.
However this is a suboptimal solution since it means maintaining two
separate copies of each of these files, and who knows what else rpc.statd
might be missing out on.
Fixed in current version of nfs-utils (0.2.1).