# NFS and RPC

## addeman

Hello everyone, 

last week i did some upgradeing of my software and cleaned out unused programs etc. Well, when i powered down the computer it froze during the shutdown process.

When i booted it yesterday (been having a vaccation) i got some errors upon boot. I noticed that my nfs-shares did not get mounted, so i manually tried 

```
mount -t nfs router:/usr/portage/distfiles /usr/portage/distfiles

mount: RPC: Program not registered 
```

 ] I then checked that the needed services were running, and afaik they were: 

```
zion adde # rc-status 

Runlevel: default

 sshd                                                                [ started ]

 distccd                                                             [ started ]

 peerguardian                                                        [ started ]

 cupsd                                                               [ started ]

 local                                                               [ started ]

 vixie-cron                                                          [ started ]

 syslog-ng                                                           [ started ]

 domainname                                                          [ started ]

 net.eth0                                                            [ started ]

 smartd                                                              [ started ]

 netmount                                                            [ started ]

 portmap                                                             [ started ] 
```

The emerge logs are as follows (somewhat cleaned up): 

```
1123675387:  >>> AUTOCLEAN: app-emulation/winesetuptk

1123675396:  >>> emerge (1 of 1) dev-libs/libpcre-6.1 to /

1123675458:  >>> AUTOCLEAN: dev-libs/libpcre

1123675460:  >>> emerge (1 of 1) dev-libs/libxslt-1.1.14-r2 to /

1123675536:  >>> AUTOCLEAN: dev-libs/libxslt

1123675545:  >>> unmerge success: dev-libs/libxslt-1.1.14

1123675546:  >>> emerge (1 of 1) net-dns/libidn-0.5.18 to /

1123675741:  >>> AUTOCLEAN: net-dns/libidn

1123675748:  >>> unmerge success: net-dns/libidn-0.5.17

1123675753:  >>> emerge (1 of 1) kde-base/kde-env-3-r3 to /

1123675761:  >>> AUTOCLEAN: kde-base/kde-env

1123675763:  >>> emerge (1 of 1) kde-base/kdelibs-3.4.2 to /

1123676040:  >>> unmerge success: media-video/kaffeine-0.6-r1

1123676090:  >>> unmerge success: media-video/mplayer-1.0_pre7

1123676217:  >>> unmerge success: kde-base/drkonqi-3.4.1

1123676240:  >>> depclean

1123676262:  >>> unmerge success: media-plugins/xmms-arts-0.7.1-r2

1123676263:  >>> unmerge success: sys-fs/cryptsetup-0.1-r1

1123676265:  >>> unmerge success: app-shells/tcsh-6.14

1123676269:  >>> unmerge success: gnome-base/librsvg-2.9.5

1123676271:  >>> unmerge success: media-libs/libungif-4.1.3-r1

1123676274:  >>> unmerge success: dev-util/indent-2.2.9-r2

1123676278:  >>> unmerge success: sys-fs/device-mapper-1.01.01

1123676280:  >>> unmerge success: media-libs/sdl-sound-1.0.1-r1

1123676282:  >>> unmerge success: app-shells/sash-3.7

1123676286:  >>> unmerge success: dev-libs/libcroco-0.6.0

1123676289:  >>> unmerge success: net-misc/pglinux-1.5

1123676290:  >>> unmerge success: app-arch/ncompress-4.2.4-r1

1123676810:  >>> emerge (1 of 5) games-sports/gracer-0.1.5 to /

1123676867:  >>> AUTOCLEAN: games-sports/gracer

1123676867:  >>> emerge (2 of 5) media-libs/imlib-1.9.14-r3 to /

1123676965:  >>> AUTOCLEAN: media-libs/imlib

1123676966:  >>> emerge (3 of 5) media-libs/imlib2-1.2.0.20050225 to /

1123680350:  >>> emerge (1 of 3) media-libs/imlib2-1.2.0.20050225 to /

1123680481:  >>> unmerge success: media-libs/imlib2-1.2.0.20050225

1123680556:  >>> emerge (1 of 2) net-libs/nfsidmap-0.10 to /

1123680581:  >>> emerge (1 of 2) kde-base/kdelibs-3.4.2 to /

1123680630:  >>> AUTOCLEAN: net-libs/nfsidmap

1123680630:  >>> emerge (2 of 2) net-fs/nfs-utils-1.0.7-r1 to /

1123680684:  >>> AUTOCLEAN: net-fs/nfs-utils

1124050123:  >>> emerge (1 of 7) dev-lang/ocaml-3.08.3 to /

1124050277:  >>> emerge (1 of 2) media-libs/imlib2-1.2.0.20050225 to /

1124050725:  >>> emerge (1 of 1) media-libs/imlib2-1.1.2 to /

1124050739:  >>> emerge (1 of 2) media-libs/imlib2-1.1.2 to /

1124051261:  >>> emerge (1 of 2) media-libs/imlib2-1.1.2 to /

1124051318:  >>> emerge (1 of 1) net-fs/nfs-utils-1.0.7-r1 to /

1124051429:  >>> AUTOCLEAN: media-libs/imlib2

1124051429:  >>> emerge (2 of 2) x11-terms/eterm-0.9.3-r4 to /

1124051430:  >>> AUTOCLEAN: net-fs/nfs-utils

1124051509:  >>> emerge (1 of 1) net-libs/nfsidmap-0.10 to /

1124051574:  >>> AUTOCLEAN: x11-terms/eterm

1124051599:  >>> AUTOCLEAN: net-libs/nfsidmap

1124051923:  >>> emerge (1 of 2) sys-fs/device-mapper-1.01.03 to /

1124051944:  >>> AUTOCLEAN: sys-fs/device-mapper

1124051944:  >>> emerge (2 of 2) sys-fs/cryptsetup-0.1-r2 to /

1124052105:  >>> emerge (1 of 1) sys-fs/cryptsetup-0.1-r2 to /

1124052154:  >>> emerge (1 of 1) net-misc/pglinux-1.5 to /

1124052181:  >>> AUTOCLEAN: net-misc/pglinux

1124052791:  >>> emerge (1 of 1) sys-fs/reiserfsprogs-3.6.19 to /

1124052854:  >>> AUTOCLEAN: sys-fs/reiserfsprogs

1124055277:  >>> emerge (1 of 1) net-fs/nfs-utils-1.0.7-r1 to /

1124055324:  >>> AUTOCLEAN: net-fs/nfs-utils 
```

 As you can see i reemerged some nfs-stuff etc but still no go.

Anyone got an idea about why i can't monut my nfs-shares?

Best regards

AddemanLast edited by addeman on Wed Aug 17, 2005 3:16 pm; edited 1 time in total

----------

## addeman

* BUMP *

Anyone got a clue?

Best regards

Addeman

----------

## addeman

Time for an update: I haven't solved it yet...

I did a 

```
emerge -e system
```

 and upgraded to kernel 2.6.12-gentoo-r7. If i do 

```
/etc/init.d/nfs restart

  * Stopping NFS mountd ...                                                [ ok ]

 * Stopping NFS daemon ...                                                [ ok ]

 * Stopping NFS statd ...                                                 [ ok ]

 * Stopping idmapd ...                                                    [ ok ]

 * Starting idmapd ...

rpc.idmapd: Skipping configuration file "/etc/idmapd.conf": No such file or directory                                                                     [ ok ]

 * Starting NFS statd ...                                                 [ ok ]

 * Starting NFS daemon ...

 * Error starting NFS daemon                                              [ !! ]

 * Starting NFS mountd ...                                                [ ok ]
```

 and a look at the system log gives 

```
cat /var/log/messages

Aug 17 13:29:43 zion rpc.statd[9664]: Version 1.0.7 Starting

Aug 17 13:29:43 zion nfsd[9666]: nfssvc: Function not implemented

Aug 17 13:29:43 zion rc-scripts: Error starting NFS daemon

```

Is this of any help? Any ideas?

Addeman

----------

## addeman

Well a solution...

After googling for nfssvc i found that it was part of the server part of NFS. I compiled in support for NFS server into my kernel. Now i get 

```
zion adde # /etc/init.d/nfs restart

 * Stopping NFS mountd ...                                                [ ok ]

 * Stopping NFS daemon ...                                                [ ok ]

 * Stopping NFS statd ...                                                 [ ok ]

 * Stopping idmapd ...                                                    [ ok ]

 * Starting idmapd ...

rpc.idmapd: Skipping configuration file "/etc/idmapd.conf": No such file or directory                                                                     [ ok ]

 * Starting NFS statd ...                                                 [ ok ]

 * Starting NFS daemon ...                                                [ ok ]

 * Starting NFS mountd ...                                                [ ok ]

zion adde # 

```

 and 

```
zion adde # /etc/init.d/portmap restart

 * Saving portmap table ...                                               [ ok ]

 * Stopping NFS mountd ...                                                [ ok ]

 * Stopping NFS daemon ...                                                [ ok ]

 * Unexporting NFS directories ...                                        [ ok ]

 * Stopping NFS statd ...                                                 [ ok ]

 * Stopping idmapd ...                                                    [ ok ]

 * Unmounting RPC pipefs ...                                              [ ok ]

 * Stopping portmap ...                                                   [ ok ]

 * Starting portmap ...                                                   [ ok ]

 * Reloading portmap table ...                                            [ ok ]

 * Mounting RPC pipefs ...                                                [ ok ]

 * Starting idmapd ...

rpc.idmapd: Skipping configuration file "/etc/idmapd.conf": No such file or directory                                                                     [ ok ]

 * Starting NFS statd ...                                                 [ ok ]

 * Starting NFS daemon ...                                                [ ok ]

 * Starting NFS mountd ...                                                [ ok ]

zion adde # 

```

 but i still get 

```
zion adde # mount -t nfs router:/mp3 /mnt/mp3/

mount: RPC: Program not registered 
```

 A look at 

```
zion adde # rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100003    4   udp   2049  nfs

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100003    4   tcp   2049  nfs

    100024    1   udp  32773  status

    100024    1   tcp  32774  status

    100021    1   udp  32774  nlockmgr

    100021    3   udp  32774  nlockmgr

    100021    4   udp  32774  nlockmgr

    100021    1   tcp  32775  nlockmgr

    100021    3   tcp  32775  nlockmgr

    100021    4   tcp  32775  nlockmgr

    100005    1   udp    609  mountd

    100005    1   tcp    612  mountd

    100005    2   udp    609  mountd

    100005    2   tcp    612  mountd

    100005    3   udp    609  mountd

    100005    3   tcp    612  mountd

zion adde # 

```

This looks like it should, and still didn't work, so i googled for the exact errorphrase, and guess what!? The solution was an update at the serverside, in the hosts.allow file. From 

```
portmap: 192.168.0.0/24

lockd: 192.168.0.0/24

rquotad: 192.168.0.0/24

mountd: 192.168.0.0/24

statd: 192.168.0.0/24

```

 to

```
portmap: 192.168.0.0/255.255.255.0

lockd: 192.168.0.0/255.255.255.0

rquotad: 192.168.0.0/255.255.255.0

mountd: 192.168.0.0/255.255.255.0

statd: 192.168.0.0/255.255.255.0

```

 Strange thing is though that when the problem arose i didn't even have a hosts.allow and a hosts.deny file on the server, so that couldn't have been the initial problem but... 

Well now i can mount my shares again  :Wink:  Now i'll have to go back to my Calaculus exam studies...

regards 

addeman

----------

## eniac

What does dmesg tell you ?

I think I've got the same problem,

dmesg output:

```
RPC: error 5 connecting to server localhost

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

----------

## addeman

Well, actually i don't know... the problem hasn't returnd since aug, and i'm afraid i don't recall what dmesg told me back then  :Wink: 

If you describe your situation a bit more detailed i can try to help you...

Best regards 

addeman

----------

