# Can't get NFS started due to portmap conflict. [SOLVED]

## 52midnight

I'm trying to get NFS running (nfs-utils-1.2.6) on a 3.7.9 kernel by following the directions at:

http://tldp.org/HOWTO/NFS-HOWTO/server.html

Everything is fine until it comes to checking that the necessary daemons are running using rpcinfo:

```
># rpcinfo -p

rpcinfo: can't contact portmapper: RPC: Remote system error - No such file or directory

```

NFS has been added to rc-update, the system rebooted, and NFS appears to be running (not sure if this is yer aKtual nfs daemon):

```
># ps ax|grep nfs

10742 ?        S<     0:00 [nfsiod]

```

... but when restarted it complains that portmap is missing:

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

 * ERROR: nfs needs service(s) portmap

```

Yet when I try to emerge portmap I get a conflict:

```
># emerge -pv portmap

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N     ] net-nds/portmap-6.0  USE="tcpd (-selinux)" 22 kB

[blocks B      ] net-nds/portmap ("net-nds/portmap" is blocking net-fs/nfs-utils-1.2.6)

Total: 1 package (1 new), Size of downloads: 22 kB

Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be

 * installed at the same time on the same system.

  (net-fs/nfs-utils-1.2.6::gentoo, installed) pulled in by

    net-fs/nfs-utils required by @selected

  (net-nds/portmap-6.0::gentoo, ebuild scheduled for merge) pulled in by

    portmap

```

Could someone please point out where I've gone wrong?Last edited by 52midnight on Sun Apr 21, 2013 7:26 pm; edited 1 time in total

----------

## Maitreya

There is no need to emerge portmap as all the services needed (rpcbind rpc.statd rpc.idmapd) are included in nfs-utils (hence the blockage)

----------

## 52midnight

Yep, thought as much.; but why won't it start? I guessed that NFS provided its own portmap service, but can't see anything relevant in the files list, and I'd assume that the startup script in /etc/init.d/ would start it ahead of the nfs daemon.

If these assumptions are correct, what's wrong, or what step have I omitted?

----------

## Maitreya

Could you try to manually start its accompanied init processes?

----------

## 52midnight

Here's the result, and thanks for your ongoing interest. Note that rpc.pipefs started, so I repeated the other two and then nfs - no luck:

```

cpq1 init.d # ./rpc.idmapd start

 * ERROR: rpc.idmapd needs service(s) portmap

cpq1 init.d # ./rpc.pipefs start

 * Setting up RPC pipefs ...                                      [ ok ]

cpq1 init.d # ./rpc.statd start

 * ERROR: rpc.statd needs service(s) portmap

cpq1 init.d # ./rpc.idmapd start

 * ERROR: rpc.idmapd needs service(s) portmap

cpq1 init.d # ./rpc.statd start

 * ERROR: rpc.statd needs service(s) portmap

cpq1 init.d # ./nfs start

 * ERROR: nfs needs service(s) portmap

```

----------

## 52midnight

This is from the NFS website at http://nfs.sourceforge.net/nfs-howto/ar01s03.html:

 *Quote:*   

> 
> 
> The daemons are all part of the nfs-utils package, and may be either in the /sbin directory or the /usr/sbin  directory. 
> 
> If your distribution does not include them in the startup scripts, then then you should add them, configured to start in the following order: 
> ...

 

Here's the list of packages installed in /sbin/ and /usr/sbin/ - there's nothing in the entire list that looks anything like portmap:

 *Quote:*   

> /sbin
> 
> /sbin/mount.nfs
> 
> /sbin/mount.nfs4 -> mount.nfs
> ...

 

----------

## krinn

Your first link is outdated, it may be valid for nfsv3, but not v4. And you will get issue if you try to setup export following it

As of today, portmap was drop in favor of a newer system rpcbind, the package is from net-dns/rpcbind

That service will provide portmap for nfsv4, and it should start as a dependency of nfsd

And it should (and is) a dependency of nfs-utils, so portage should have install it for you already.

You have badly play with portage ?

----------

## 52midnight

> As of today, portmap was drop in favor of a newer system rpcbind, the package is from net-dns/rpcbind 

Many thanks; thought something like this was the case.

> And it should (and is) a dependency of nfs-utils, so portage should have install it for you already. 

Yes; I just went ahead and emerged it, and Portage did so, but unmerged an already-installed instance.

> You have badly play with portage ?

Nope, did a --sync just two days ago and it's been working fine apart from this.

Is there an up-to-date HOWTO or other documentation to get the service running?

----------

## krinn

I check the wiki and that doc is well made for nfsv4 (looks like some users of that wiki are good, making it of value, something i have doubt initially) : http://wiki.gentoo.org/wiki/NFSv4

For the portmap service, nothing is need, the nfsd script start it itself.

----------

## 52midnight

I've just done:

```
># emerge --sync

># emerge --unmerge nfs-utils rpcbind

># emerge nfs-utils

```

Invoking the script produces:

```
># /etc/init.d/nfs start

 * Caching service dependencies ...                                                                                    [ ok ]

 * Starting rpcbind ...

The local transport is called "unix" in /etc/netconfig.

Please change this to "local" manually or run mergemaster(8).

See UPDATING entry 20021216 for details.

Continuing in 10 seconds

This warning will be removed 20030301

 * start-stop-daemon: failed to start `/sbin/rpcbind'                                                                  [ !! ]

 * ERROR: rpcbind failed to start

 * Starting rpcbind ...

The local transport is called "unix" in /etc/netconfig.

Please change this to "local" manually or run mergemaster(8).

See UPDATING entry 20021216 for details.

Continuing in 10 seconds

This warning will be removed 20030301

 * start-stop-daemon: failed to start `/sbin/rpcbind'                                                                  [ !! ]

 * ERROR: rpcbind failed to start

 * ERROR: cannot start rpc.statd as rpcbind would not start

 * Starting rpcbind ...

The local transport is called "unix" in /etc/netconfig.

Please change this to "local" manually or run mergemaster(8).

See UPDATING entry 20021216 for details.

Continuing in 10 seconds

This warning will be removed 20030301

 * start-stop-daemon: failed to start `/sbin/rpcbind'                                                                  [ !! ]

 * ERROR: rpcbind failed to start

 * ERROR: cannot start rpc.idmapd as rpcbind would not start

 * ERROR: cannot start nfs as rpcbind would not start

```

The file /etc/netconfig contains a single line:

 *Quote:*   

> ># cat netconfig 
> 
> # empty file because --include-config=n when `quickpkg` was used
> 
> 

 

Would you mind commenting on this? I have FEATURES="buildpkg" set in make.conf - not sure if this is relevant.

----------

## Maitreya

Maybe the wrong config got saved in an earlier run with quickpkg because below is my cat of /etc/netconfig

 *Quote:*   

> 
> 
> #
> 
> # The network configuration file. This file is currently only used in
> ...

 

----------

## 52midnight

I pasted your cat into my netconfig and all is fine.

> Maybe the wrong config got saved in an earlier run with quickpkg because below is my cat of /etc/netconfig

Yes; I probably jumped into the middle of an upgrade during the last week or so and things got out of sync.

The wiki page looks to be nicely written; concise and competent.

Thanks very much for sorting this out so smoothly.

----------

