Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
configure nfsv4 to only use ipv4
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
luciano
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 132

PostPosted: Sat Mar 07, 2015 1:03 pm    Post subject: configure nfsv4 to only use ipv4 Reply with quote

Hi,

After some upgrades my nfs-server won't start anymore. I get the following:

Code:

● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; disabled)
   Active: failed (Result: exit-code) since Sat 2015-03-07 12:52:40 GMT; 7min ago
  Process: 30595 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE)
  Process: 30593 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 30595 (code=exited, status=1/FAILURE)

Mar 07 12:52:40 chichenitza rpc.nfsd[30595]: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Mar 07 12:52:40 chichenitza rpc.nfsd[30595]: rpc.nfsd: address family inet6 not supported by protocol TCP
Mar 07 12:52:40 chichenitza rpc.nfsd[30595]: rpc.nfsd: unable to set any sockets for nfsd
Mar 07 12:52:40 chichenitza systemd[1]: nfs-server.service: main process exited, code=exited, status=1/FAILURE
Mar 07 12:52:40 chichenitza systemd[1]: Failed to start NFS server and services.
Mar 07 12:52:40 chichenitza systemd[1]: Unit nfs-server.service entered failed state.


This would be because I don't have IPV6 enabled in my kernel.

Can anybody indicate how to configure nfsd to NOT use IPv6?

I've tried adding the -H flag with a v4 address in /etc/conf.d/nfsd rpc mountd options, but doesn't appear to help. I'm sure it's documented somewhere, but I guess it's easier to ask the experts! :)

Some info on my config:

Code:

# /etc/conf.d/nfs

# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf

# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES="rpc.idmapd"

# Number of servers to be started up by default
OPTS_RPC_NFSD="8"

# Options to pass to rpc.mountd
# ex. OPTS_RPC_MOUNTD="-p 32767"
OPTS_RPC_MOUNTD="-H 192.168.1.3 -p 32767"

# Options to pass to rpc.statd
# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
OPTS_RPC_STATD="-H 192.168.1.3 -p 32765 -o 32766"

# Options to pass to rpc.idmapd
OPTS_RPC_IDMAPD=""

Back to top
View user's profile Send private message
luciano
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 132

PostPosted: Sat Mar 07, 2015 1:34 pm    Post subject: Reply with quote

Well this https://bugs.centos.org/view.php?id=5398 appears to suggest the only way to fix this is to compile without ipv6 support. Will give it a whirl.
Back to top
View user's profile Send private message
luciano
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 132

PostPosted: Sat Mar 07, 2015 1:43 pm    Post subject: Reply with quote

Ok the ipv6 flag was a red herring. re-compiling without it has made some of the messages go away, but it's still failing. These message remain:

Code:

● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; disabled)
   Active: failed (Result: exit-code) since Sat 2015-03-07 13:40:51 GMT; 19s ago
  Process: 10935 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE)
  Process: 10933 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 10935 (code=exited, status=1/FAILURE)

Mar 07 13:40:51 chichenitza rpc.nfsd[10935]: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Mar 07 13:40:51 chichenitza rpc.nfsd[10935]: rpc.nfsd: unable to set any sockets for nfsd
Mar 07 13:40:51 chichenitza systemd[1]: nfs-server.service: main process exited, code=exited, status=1/FAILURE
Mar 07 13:40:51 chichenitza systemd[1]: Failed to start NFS server and services.
Mar 07 13:40:51 chichenitza systemd[1]: Unit nfs-server.service entered failed state.


Any suggestions?
Back to top
View user's profile Send private message
luciano
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 132

PostPosted: Sat Mar 07, 2015 1:48 pm    Post subject: Reply with quote

Ok turned out it was because I hadn't started rpcbind.

The README for the systemd unit files mentions this:

Quote:

7 They do *not* include any unit files for separate services such as
8 rpc.rquotad (in the 'quota' package) or rpcbind.


However, I would have thought that should have been one of the dependencies for the unit files ... weird.

Problem fixed by running 'systemctl start rpcbind' before 'nfs-server'
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