[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#625601: mount.nfs complains about statd is not running while it is running



Package: nfs-common
Version: 1:1.2.3-2
Severity: important

rpcinfo: can't contact portmapper: rpcinfo: RPC: Authentication error; why = Client credential too weak
The package bug script /usr/share/bug/nfs-common/script exited with an error status (return code = 256). Do you still want to file a report? [y|N|q|?]?

reporting nevertheless.

I start nfs client services:

shambhala:~> /etc/init.d/nfs-common stop
Stopping NFS common utilities: idmapd statd.
shambhala:~> /etc/init.d/rpcbind stop
Stopping rpcbind daemon....
shambhala:~> /etc/init.d/rpcbind start
Starting rpcbind daemon....
shambhala:~> rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
shambhala:~> /etc/init.d/nfs-common start
Starting NFS common utilities: statd idmapd.
shambhala:~> rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  37575  status
    100024    1   tcp  54562  status
shambhala:~> ps aux | grep statd | grep -v grep
statd    13555  0.0  0.0   2268  1012 ?        Ss   15:37   0:00 /sbin/rpc.statd


I mount an export:

shambhala:~> mount -t nfs -o vers=3 172.21.101.9:/vol/nfstest /mnt/zeit
/bin/sh: Illegal option -p
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

(I reported the bashism in /usr/sbin/start-statd separately.)


I have in daemon.log:

shambhala:~> tail -3 /var/log/daemon.log                    
May  4 15:37:35 localhost rpc.statd[13555]: Version 1.2.3 starting
May  4 15:37:35 localhost sm-notify[13556]: Version 1.2.3 starting
May  4 15:37:35 localhost sm-notify[13556]: Already notifying clients; Exiting!

sm-notify does not appear to be running:

shambhala:~> ps aux | egrep "(rpc|sm-notify)" | grep -v grep
root      1906  0.0  0.0      0     0 ?        S<   13:55   0:00 [rpciod]
root     13544  0.0  0.0   2204   932 ?        Ss   15:37   0:00 /sbin/rpcbind -w
statd    13555  0.0  0.0   2268  1012 ?        Ss   15:37   0:00 /sbin/rpc.statd
root     13568  0.0  0.0   2492   536 ?        Ss   15:37   0:00 /usr/sbin/rpc.idmapd

Thanks.

-- Package-specific info:
-- rpcinfo --

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (450, 'testing'), (400, 'unstable'), (110, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38.5-tp42-snapshot-resv-size-dirty (PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nfs-common depends on:
ii  adduser                  3.112+nmu2      add and remove users and groups
ii  initscripts              2.88dsf-13.5    scripts for initializing and shutt
ii  libc6                    2.11.2-11       Embedded GNU C Library: Shared lib
ii  libcap2                  1:2.20-1        support for getting/setting POSIX.
ii  libcomerr2               1.41.12-2       common error description library
ii  libevent-1.4-2           1.4.13-stable-1 An asynchronous event notification
ii  libgssapi-krb5-2         1.9+dfsg-1+b1   MIT Kerberos runtime libraries - k
ii  libgssglue1              0.2-2           mechanism-switch gssapi library
ii  libk5crypto3             1.9+dfsg-1+b1   MIT Kerberos runtime libraries - C
ii  libkrb5-3                1.9+dfsg-1+b1   MIT Kerberos runtime libraries
ii  libnfsidmap2             0.24-1          An nfs idmapping library
ii  libtirpc1                0.2.1-1         transport-independent RPC library
ii  libwrap0                 7.6.q-19        Wietse Venema's TCP wrappers libra
ii  lsb-base                 3.2-27          Linux Standard Base 3.2 init scrip
ii  netbase                  4.45            Basic TCP/IP networking system
ii  rpcbind                  0.2.0-6         converts RPC program numbers into 
ii  ucf                      3.0025+nmu2     Update Configuration File: preserv

Versions of packages nfs-common recommends:
ii  python                        2.6.6-14   interactive high-level object-orie

nfs-common suggests no packages.

-- Configuration Files:
/etc/init.d/nfs-common changed:
DESC="NFS common utilities"
DEFAULTFILE=/etc/default/nfs-common
PREFIX=
NEED_STATD=
NEED_IDMAPD=
NEED_GSSD=
PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs
RPCGSSDOPTS=
if [ -f $DEFAULTFILE ]; then
    . $DEFAULTFILE
fi
. /lib/lsb/init-functions
[ -x $PREFIX/sbin/rpc.statd ] || exit 0
AUTO_NEED_IDMAPD=no
AUTO_NEED_GSSD=no
if [ -f /etc/fstab ]; then
    exec 9<&0 </etc/fstab
    while read DEV MTPT FSTYPE OPTS REST
    do
	case $DEV in
	    ''|\#*)
		continue
		;;
	esac
	# FSTYPE "nfs" can be NFSv4 now
        #if [ "$FSTYPE" = "nfs4" ]; then
            AUTO_NEED_IDMAPD=yes
        #fi
        case "$OPTS" in
            sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
    	    AUTO_NEED_GSSD=yes
            ;;
        esac
    done
    exec 0<&9 9<&-
fi
if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' /etc/exports; then
    AUTO_NEED_IDMAPD=yes
fi
case "$NEED_STATD" in
    yes|no)
        ;;
    *)
        NEED_STATD=yes
        ;;
esac
case "$NEED_IDMAPD" in
    yes|no)	
        ;;
    *)
        NEED_IDMAPD=$AUTO_NEED_IDMAPD
	;;
esac
case "$NEED_GSSD" in
    yes|no)	
        ;;
    *)
        NEED_GSSD=$AUTO_NEED_GSSD
	;;
esac
do_modprobe() {
    if [ -x /sbin/modprobe -a -f /proc/modules ]
    then
        modprobe -q "$1" || true
    fi
}
do_mount() {
    if ! grep -E -qs "$1\$" /proc/filesystems
    then
	return 1
    fi
    if ! mountpoint -q "$2"
    then
	mount -t "$1" "$1" "$2"
	return
    fi
    return 0
}
do_umount() {
    if mountpoint -q "$1"
    then
	umount "$1"
    fi
    return 0
}
case "$1" in
  start)
	log_daemon_msg "Starting $DESC"
	if [ "$NEED_STATD" = yes ]; then
	    log_progress_msg "statd"
	    
	    # See if portmap or rpcbind are running
	    (cat </dev/null >/dev/tcp/localhost/111) 2>/dev/null
	    RET=$?
	    if [ $RET != 0 ]; then
		echo
		log_warning_msg "Not starting: portmap daemon is not running"
		exit 0
	    fi
	    start-stop-daemon --start --oknodo --quiet \
		--pidfile /var/run/rpc.statd.pid \
	        --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
	    RET=$?
	    if [ $RET != 0 ]; then
	        log_end_msg $RET
	        exit $RET
	    else
		mkdir -p /lib/init/rw/sendsigs.omit.d
		rm -f /lib/init/rw/sendsigs.omit.d/statd
		ln -s /var/run/rpc.statd.pid /lib/init/rw/sendsigs.omit.d/statd
	    fi
	fi
	# Don't start idmapd and gssd if we don't have them (say, if /usr is not
	# up yet).
	[ -x /usr/sbin/rpc.idmapd ] || NEED_IDMAPD=no
	[ -x /usr/sbin/rpc.gssd   ] || NEED_GSSD=no
	if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ]
	then
	    do_modprobe sunrpc
	    do_modprobe nfs
	    do_modprobe nfsd
	    if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT
	    then
	    	if [ "$NEED_IDMAPD" = yes ]
		then
	            log_progress_msg "idmapd"
		    start-stop-daemon --start --oknodo --quiet \
			    --exec /usr/sbin/rpc.idmapd
		    RET=$?
	            if [ $RET != 0 ]; then
        	        log_end_msg $RET
        	        exit $RET
                    fi
		fi
		if [ "$NEED_GSSD" = yes ]
		then
		    do_modprobe rpcsec_gss_krb5
	            log_progress_msg "gssd"
	            # we need this available; better to fail now than
		    # mysteriously on the first mount
		    if ! grep -q -E '^nfs[	 ]' /etc/services; then
		    	log_action_end_msg 1 "broken /etc/services, please see /usr/share/doc/nfs-common/README.Debian.nfsv4"
			exit 1
		    fi
		    start-stop-daemon --start --oknodo --quiet \
			    --exec /usr/sbin/rpc.gssd -- $RPCGSSDOPTS
		    RET=$?
	            if [ $RET != 0 ]; then
        	        log_end_msg $RET
        	        exit $RET
                    fi
		fi
	    fi
	fi
	log_end_msg 0
	;;
  stop)
	log_daemon_msg "Stopping $DESC"
	if [ "$NEED_GSSD" = yes ]
	then
	    log_progress_msg "gssd"
	    start-stop-daemon --stop --oknodo --quiet \
		    --name rpc.gssd
	    RET=$?
	    if [ $RET != 0 ]; then
                log_end_msg $RET
                exit $RET
            fi
	fi
	if [ "$NEED_IDMAPD" = yes ]
	then
	    log_progress_msg "idmapd"
	    start-stop-daemon --stop --oknodo --quiet \
		--name rpc.idmapd
            RET=$?
	    if [ $RET != 0 ]; then
                log_end_msg $RET
                exit $RET
            fi
	fi
	if [ "$NEED_STATD" = yes ]
	then
	    log_progress_msg "statd"
	    start-stop-daemon --stop --oknodo --quiet \
	        --name rpc.statd
	    RET=$?
	    if [ $RET != 0 ]; then
                log_end_msg $RET
                exit $RET
            fi
	fi
	do_umount $PIPEFS_MOUNTPOINT 2>/dev/null || true
	log_end_msg 0
	;;
  status)
	if [ "$NEED_STATD" = yes ]
	then
	    if ! pidof rpc.statd >/dev/null
	    then
	        echo "rpc.statd not running"
	        exit 3
	    fi
	fi
	if [ "$NEED_GSSD" = yes ]
	then
            if ! pidof rpc.gssd >/dev/null
	    then
		echo "rpc.gssd not running"
		exit 3
	    fi
	fi
	if [ "$NEED_IDMAPD" = yes ]
	then
            if ! pidof rpc.idmapd >/dev/null
	    then
		echo "rpc.idmapd not running"
		exit 3
	    fi
	fi
	echo "all daemons running"
	exit 0
	;;
  restart | force-reload)
	$0 stop
	sleep 1
	$0 start
	;;
  *)
	log_success_msg "Usage: nfs-common {start|stop|status|restart}"
	exit 1
	;;
esac
exit 0


-- no debconf information

-- debsums errors found:
debsums: changed file /var/lib/nfs/state (from nfs-common package)



Reply to: