Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't get NFS started due to portmap conflict. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Fri Apr 19, 2013 12:13 am    Post subject: Can't get NFS started due to portmap conflict. [SOLVED] Reply with quote

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:
Code:
># 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):
Code:
># ps ax|grep nfs
10742 ?        S<     0:00 [nfsiod]

... but when restarted it complains that portmap is missing:
Code:
># /etc/init.d/nfs restart
 * ERROR: nfs needs service(s) portmap

Yet when I try to emerge portmap I get a conflict:
Code:
># 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
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Fri Apr 19, 2013 1:08 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Fri Apr 19, 2013 3:14 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Sat Apr 20, 2013 9:54 am    Post subject: Reply with quote

Could you try to manually start its accompanied init processes?
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Sat Apr 20, 2013 7:23 pm    Post subject: Reply with quote

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:
Code:

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
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Sat Apr 20, 2013 7:38 pm    Post subject: Reply with quote

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:

rpc.portmap
rpc.mountd, rpc.nfsd
rpc.statd, rpc.lockd (if necessary), and
rpc.rquotad

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
/sbin/osd_login
/sbin/rpc.statd
/sbin/umount.nfs -> mount.nfs
/sbin/umount.nfs4 -> mount.nfs

/usr/sbin
/usr/sbin/exportfs
/usr/sbin/mountstats
/usr/sbin/nfsiostat
/usr/sbin/nfsstat
/usr/sbin/rpc.idmapd
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/usr/sbin/rpcdebug
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Apr 20, 2013 10:43 pm    Post subject: Reply with quote

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 ?
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Sun Apr 21, 2013 2:07 am    Post subject: Reply with quote

> 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?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sun Apr 21, 2013 11:02 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Sun Apr 21, 2013 2:07 pm    Post subject: Reply with quote

I've just done:
Code:
># emerge --sync
># emerge --unmerge nfs-utils rpcbind
># emerge nfs-utils

Invoking the script produces:
Code:
># /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.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Sun Apr 21, 2013 4:55 pm    Post subject: Reply with quote

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
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
# <network_id> <semantics> <flags> <protofamily> <protoname> \
# <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp tpi_clts v inet udp - -
tcp tpi_cots_ord v inet tcp - -
udp6 tpi_clts v inet6 udp - -
tcp6 tpi_cots_ord v inet6 tcp - -
rawip tpi_raw - inet - - -
local tpi_cots_ord - loopback - - -
unix tpi_cots_ord - loopback - - -
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Sun Apr 21, 2013 7:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum