Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS using random ports[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
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Mar 27, 2016 10:55 am    Post subject: NFS using random ports[solved] Reply with quote

The rpc.mountd process has stopped using the port I had specified in /etc/conf.d/nfs:
tcp 0 0 0.0.0.0:55003 0.0.0.0:* LISTEN 359/rpc.mountd
tcp 0 0 0.0.0.0:45406 0.0.0.0:* LISTEN 359/rpc.mountd
tcp 0 0 0.0.0.0:50957 0.0.0.0:* LISTEN 359/rpc.mountd
udp 0 0 0.0.0.0:36574 0.0.0.0:* 359/rpc.mountd
udp 0 0 0.0.0.0:46209 0.0.0.0:* 359/rpc.mountd
udp 0 0 0.0.0.0:46843 0.0.0.0:* 359/rpc.mountd

/etc/conf.d/nfs:
OPTS_RPC_MOUNTD="-p 32767"

pc ~ # netstat -tulnp | grep -i 32767
pc ~ #

the only change I recall making was enabling the kerberos flag in NFS-utils


Last edited by Adel Ahmed on Mon Apr 04, 2016 10:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Thu Mar 31, 2016 10:51 pm    Post subject: Re: NFS using random ports Reply with quote

Adel Ahmed wrote:
The rpc.mountd process has stopped using the port I had specified in /etc/conf.d/nfs:
tcp 0 0 0.0.0.0:55003 0.0.0.0:* LISTEN 359/rpc.mountd
tcp 0 0 0.0.0.0:45406 0.0.0.0:* LISTEN 359/rpc.mountd
tcp 0 0 0.0.0.0:50957 0.0.0.0:* LISTEN 359/rpc.mountd
udp 0 0 0.0.0.0:36574 0.0.0.0:* 359/rpc.mountd
udp 0 0 0.0.0.0:46209 0.0.0.0:* 359/rpc.mountd
udp 0 0 0.0.0.0:46843 0.0.0.0:* 359/rpc.mountd

/etc/conf.d/nfs:
OPTS_RPC_MOUNTD="-p 32767"

pc ~ # netstat -tulnp | grep -i 32767
pc ~ #

the only change I recall making was enabling the kerberos flag in NFS-utils


Are you using systemd? If so then look at the command line in the unit file, specifically the environment variable that would pass the port number in the Exec= and the name of the environment variable in the conf.d/nfs file. If so, file bug if not sorry - no idea (but check the OpenRC script for a similar problem and file a bug if it's like that there as well)

[edit]Sorry, I'll spell it out for systemd:

in /etc/conf.d/nfs
Code:
# Options to pass to rpc.mountd
# ex. OPTS_RPC_MOUNTD="-p 32767"
OPTS_RPC_MOUNTD="-p 32767"


In the unit:
Code:
ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS


RPCMOUNTDARGS != OPTS_RPC_MOUNTD

Ahh, here we go: https://bugs.gentoo.org/show_bug.cgi?id=544772

[edit]Sorry again:
grep for EnvironmentFile in /usr/lib/systemd/system/nfs*

and add all those env vars to your /etc/conf.d/nfs and set both the current ones and the ones in the units. That way you'll carry on working if they are "fixed" in the future. OR create your own override files in /etc/systemd/system/ as per the ssytemd docs.

Cheers
Jon
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Mon Apr 04, 2016 7:03 pm    Post subject: Reply with quote

I just editted the service file as you had mentiiend and things are back to normal now
thanks
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Mon Apr 04, 2016 9:55 pm    Post subject: Reply with quote

Adel Ahmed wrote:
I just editted the service file as you had mentiiend and things are back to normal now
thanks


Cool, glad to help. Mark the topic [SOLVED] - it might help someone else in the future
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