# Network (nfs) doesn't work...

## appelgebak

Hi,

i had an update to nfs-utils to 1.1.0-r1, but then suddenly booting hangs on 

starting nfs.

Looking for the moment of crash shows that '/etc/init.d/portmap start'

gets back to the prompt, but "rcpinfo -p" shows nothing!

So '/etc/init.d/nfs --debug start' ends in:

```
+ [[ -e /var/lib/init.d/inactive/rpc.statd ]]

+ is_fake_service rpc.statd default

+ local x fake_services

+ [[ -z rpc.statd ]]

+ [[ -z default ]]

+ [[ default != \b\o\o\t ]]

+ [[ -e /etc/runlevels/boot/.fake ]]

+ [[ -e /etc/runlevels/default/.fake ]]

+ return 1

+ begin_service rpc.statd

+ local service=rpc.statd

+ [[ -z rpc.statd ]]

+ [[ '' == \y\e\s ]]

+ [[ '' == \y\e\s ]]

+ mkfifo /var/lib/init.d/exclusive/rpc.statd

+ splash svc_start rpc.statd

+ return 0

+ [[ no != \y\e\s ]]

+ profiling name '/etc/init.d/rpc.statd start'

+ return 0

+ /etc/init.d/rpc.statd start

 * Mounting nfsd filesystem in /proc ...                                                                                            [ ok ]

 * Starting NFS statd ...

```

And there it hangs...

I emerged all nfs-relating stuff again, but 'no way'...

I have NFS support (V3) in the kernel, 

emerge --info says: 

```
einstein ~ # emerge --info

Portage 2.1.3.9 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r4, 2.6.23-rc7n i686)

=================================================================

System uname: 2.6.23-rc7n i686 AMD Athlon(tm) processor

Timestamp of tree: Fri, 28 Sep 2007 17:30:01 +0000

distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]

app-shells/bash:     3.2_p15-r1

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.3.5-r3, 2.4.4-r4, 2.5.1-r2

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.18.1

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.17

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.23b

virtual/os-headers:  2.6.21

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=athlon-tbird -pipe -fomit-frame-pointer -fno-strict-aliasing"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"

CXXFLAGS="-O2 -march=athlon-tbird -pipe -fomit-frame-pointer -fno-strict-aliasing"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="de_DE.UTF-8"

LC_ALL="de_DE.UTF-8"

LINGUAS="de"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl acpi alsa arts avi berkdb bitmap-fonts bluetooth bonobo cairo cdr cli cracklib crypt cups dbus decss dri dvb dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gb gd gdbm gif gnome gpg gpm gstreamer gtk hal iconv ipod isdnlog jpeg kde kdeenablefinal kdexdeltas kerberos ldap libg++ libusb libwww lm_sensors lvm mad matrox mga midi mikmod mjpeg mmx mono motif mozilla mp3 mpeg mudflap mysql ncurses nls nptl nptlonly ogg oggvorbis opengl openmp oss pam pcre pdf pdflib perl png postgres pppd python qt qt3 qt3support qt4 quicktime readline reflection sdl session slang sms snmp spell spl ssl svg tcl tcpd tex tiff tk truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs x86 xfs xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="matrox vesa fbdev v4l vmware glint nvidia mga vga svga"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

PLEASE HELP!! IT IS THE COMPI FROM MY DAUGTHER!!  PLEASE HELP!! BEFORE SHE KILLS MEEEE...

Appel

----------

## Ma3oxuct

I am having the same problem; except with a fresh install. 

It is the same version as appelgebak net-fs/nfs-utils-1.1.0-r1.

I have something in rpcinfo.

```
rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper
```

I am using an older kernel: 

```
Linux Ma3oxuct 2.6.20.7 #4 SMP PREEMPT Sat Sep 15 16:17:07 EDT 2007 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux
```

I have made sure to 

```
modprobe nfs

modprobe nfsd
```

----------

## thewhale

I use NFS to store backups on a NAS once every two weeks or so. A few days ago, the net-fs/nfs-utils package was updated to  1.1.0-r1, and today, as I was starting my backup script, my NFS share wasn't accessible anymore; apparently, it didn't exist, although 

```
ls
```

 displayed it without complaining. As a workaround, I downgraded nfs-utils to 1.0.12-r1; everthing's working fine again.

I can't tell whether nfs-utils are broken or if some minor change in behaviour didn't play well with my particular configuration; I just thought I'd report this.

----------

## Ma3oxuct

This sounds like some sort of bug; I wonder what we all have in common on our setups.....Do you all have custom configured kernels? Is nfs built in or a module? USE flags enabled?

I have a custom configured kernel with nfs as a module:

```
# Network File Systems

#

CONFIG_NFS_FS=m

# CONFIG_NFS_V3 is not set

CONFIG_NFS_V4=y

CONFIG_NFS_DIRECTIO=y

CONFIG_NFSD=m

# CONFIG_NFSD_V3 is not set

CONFIG_NFSD_TCP=y

CONFIG_LOCKD=m

CONFIG_EXPORTFS=m

CONFIG_NFS_COMMON=y

CONFIG_SUNRPC=m

CONFIG_SUNRPC_GSS=m

CONFIG_RPCSEC_GSS_KRB5=m

# CONFIG_RPCSEC_GSS_SPKM3 is not set

# CONFIG_SMB_FS is not set

# CONFIG_CIFS is not set

# CONFIG_NCP_FS is not set

# CONFIG_CODA_FS is not set

# CONFIG_AFS_FS is not set

# CONFIG_9P_FS is not set
```

```
[ Found these USE variables for net-fs/nfs-utils-1.1.0-r1 ]

 U I

 - - kerberos : Adds kerberos support

 - - nonfsv4  : Disable support for NFSv4

 + + tcpd     : Adds support for TCP wrappers
```

There is no special stuff I have to setup for nfsv4?

----------

## appelgebak

I downgraded my nfs-utils  to 1.0.12-r1, portmapper to 5b-r9,

but the result is the same - it hangs by pmap_dump.

Manually calling pmap_dump also hangs, can get no rpcinfo, i think there ist the big hole.

I have no other machine that doesn't tell me something about rpcinfo.

I hope there is some help from you, i am not able to solve this...

Appel

----------

## Ma3oxuct

Downgrading did not help me. 

```

Ma3oxuct ~ # /etc/init.d/nfs start

 * Caching service dependencies ...                                                                                   [ ok ]

 * Mounting nfsd filesystem in /proc ...                                                                              [ ok ]

 * Mounting RPC pipefs ...                                                                                            [ ok ]

 * Starting idmapd ...                                                                                                [ ok ]

 * Starting NFS statd ...

```

Mine is stuck here....my pmap_dump shows: 

```
Ma3oxuct ~ # pmap_dump

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper
```

So, our problems might be different.

You've tried rebooting, right? What does your kernel config look like? (/usr/src/linux/.config).

----------

## Ma3oxuct

What does your dmesg say? Mine says:

```
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

portmap: server localhost not responding, timed out

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

portmap: server localhost not responding, timed out

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

portmap: server localhost not responding, timed out

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

portmap: server localhost not responding, timed out

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

portmap: server localhost not responding, timed out

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

lockd_up: makesock failed, error=-5
```

Ok I fixed it.....

It was a matter of adding these rules to iptables: 

```
-A INPUT -p tcp -m state --state NEW -m multiport --dport 111,2049,4001,32764:32767 -j ACCEPT

-A INPUT -p udp -m state --state NEW -m multiport --dport 111,2049,4001,32764:32767 -j ACCEPT
```

----------

## GrayFox

I have the same problem as the OP.

tail /var/log/messages and dmesg tell me nothing. (at least nothing regarding rpc.statd)

The only additional information I can give is that when I kill the /etc/init.d/nfs start command it behaves differently when I try it again.

It hangs here then:

```

...

+ [[ -d /var/lib/init.d/softscripts.old ]]

+ for x in '${startupservices}'

+ [[ portmap == \n\e\t ]]

+ [[ portmap != \n\e\t ]]

+ service_stopped portmap

+ [[ -z portmap ]]

+ service_starting portmap

+ test_service_state portmap starting

+ [[ -z portmap ]]

+ [[ -z starting ]]

+ local f=/var/lib/init.d/starting/portmap

+ [[ ! -x /etc/init.d/portmap ]]

+ [[ -e /var/lib/init.d/starting/portmap ]]

+ service_started portmap

+ test_service_state portmap started

+ [[ -z portmap ]]

+ [[ -z started ]]

+ local f=/var/lib/init.d/started/portmap

+ [[ ! -x /etc/init.d/portmap ]]

+ [[ -e /var/lib/init.d/started/portmap ]]

+ return 1

+ for x in '${startupservices}'

+ [[ rpc.statd == \n\e\t ]]

+ [[ rpc.statd != \n\e\t ]]

+ service_stopped rpc.statd

+ [[ -z rpc.statd ]]

+ service_starting rpc.statd

+ test_service_state rpc.statd starting

+ [[ -z rpc.statd ]]

+ [[ -z starting ]]

+ local f=/var/lib/init.d/starting/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/starting/rpc.statd ]]

+ service_started rpc.statd

+ test_service_state rpc.statd started

+ [[ -z rpc.statd ]]

+ [[ -z started ]]

+ local f=/var/lib/init.d/started/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/started/rpc.statd ]]

+ service_stopping rpc.statd

+ test_service_state rpc.statd stopping

+ [[ -z rpc.statd ]]

+ [[ -z stopping ]]

+ local f=/var/lib/init.d/stopping/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/stopping/rpc.statd ]]

+ service_inactive rpc.statd

+ test_service_state rpc.statd inactive

+ [[ -z rpc.statd ]]

+ [[ -z inactive ]]

+ local f=/var/lib/init.d/inactive/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/inactive/rpc.statd ]]

+ return 0

+ start_service rpc.statd

+ local service=rpc.statd

+ [[ -z rpc.statd ]]

+ [[ ! -e /etc/init.d/rpc.statd ]]

+ service_starting rpc.statd

+ test_service_state rpc.statd starting

+ [[ -z rpc.statd ]]

+ [[ -z starting ]]

+ local f=/var/lib/init.d/starting/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/starting/rpc.statd ]]

+ service_started rpc.statd

+ test_service_state rpc.statd started

+ [[ -z rpc.statd ]]

+ [[ -z started ]]

+ local f=/var/lib/init.d/started/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/started/rpc.statd ]]

+ service_inactive rpc.statd

+ test_service_state rpc.statd inactive

+ [[ -z rpc.statd ]]

+ [[ -z inactive ]]

+ local f=/var/lib/init.d/inactive/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/inactive/rpc.statd ]]

+ is_fake_service rpc.statd default

+ local x fake_services

+ [[ -z rpc.statd ]]

+ [[ -z default ]]

+ [[ default != \b\o\o\t ]]

+ [[ -e /etc/runlevels/boot/.fake ]]

+ [[ -e /etc/runlevels/default/.fake ]]

+ return 1

+ begin_service rpc.statd

+ local service=rpc.statd

+ [[ -z rpc.statd ]]

+ [[ '' == \y\e\s ]]

+ [[ '' == \y\e\s ]]

+ mkfifo /var/lib/init.d/exclusive/rpc.statd

+ return 0

+ for x in '${startupservices}'

+ [[ net == \n\e\t ]]

+ net_service nfs

+ [[ -n nfs ]]

+ [[ nfs == \n\e\t ]]

+ is_net_up

+ local x=

+ case "${RC_NET_STRICT_CHECKING}" in

++ dolisting '/var/lib/init.d/started/net.*'

++ local x=

++ local y=

++ local tmpstr=

++ local mylist=

++ local 'mypath=/var/lib/init.d/started/net.*'

++ [[ /var/lib/init.d/started/net.* != \/\v\a\r\/\l\i\b\/\i\n\i\t\.\d\/\s\t\a\r\t\e\d\/\n\e\t\.\* ]]

++ for x in '${mypath}'

++ [[ ! -e /var/lib/init.d/started/net.* ]]

++ continue

++ echo ''

+ return 1

+ is_runlevel_start

+ [[ -d /var/lib/init.d/softscripts.old ]]

+ [[  portmap rpc.statd net  == *\ \n\e\t\ * ]]

+ startupservices=' portmap rpc.statd net '

+ startupservices=' portmap rpc.statd  '

+ startupservices=' portmap rpc.statd  '

+ for x in '${startupservices}'

+ service_started portmap

+ test_service_state portmap started

+ [[ -z portmap ]]

+ [[ -z started ]]

+ local f=/var/lib/init.d/started/portmap

+ [[ ! -x /etc/init.d/portmap ]]

+ [[ -e /var/lib/init.d/started/portmap ]]

+ continue

+ for x in '${startupservices}'

+ service_started rpc.statd

+ test_service_state rpc.statd started

+ [[ -z rpc.statd ]]

+ [[ -z started ]]

+ local f=/var/lib/init.d/started/rpc.statd

+ [[ ! -x /etc/init.d/rpc.statd ]]

+ [[ -e /var/lib/init.d/started/rpc.statd ]]

+ wait_service rpc.statd

+ local service=rpc.statd

+ local fifo=/var/lib/init.d/exclusive/rpc.statd

+ [[ '' == \y\e\s ]]

+ [[ '' == \y\e\s ]]

+ [[ ! -e /var/lib/init.d/exclusive/rpc.statd ]]

++ cat /var/lib/init.d/exclusive/rpc.statd

```

Typing cat /var/lib/init.d/exclusive/rpc.statd in a console also hangs. So I deleted that file and it hangs again trying to start statd.

Have you (OP) or anybody else a fix for this yet? It's really wierd that nfs stopped working. I searched bugs.gentoo.org the forums and even google couldn't find anything related to that.

(Yes I have NFS in the kernel and I don't have a firewall on this machine; maybe amd64 related?)

#EDIT

Ok I just found out that I was missing the file net.lo in /etc/init.d. Put it back in there and all's fine. So it's solved for me.

----------

