View previous topic :: View next topic |
Author |
Message |
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
Posted: Sat Mar 07, 2015 1:03 pm Post subject: configure nfsv4 to only use ipv4 |
|
|
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 |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
|
Back to top |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
Posted: Sat Mar 07, 2015 1:43 pm Post subject: |
|
|
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 |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
Posted: Sat Mar 07, 2015 1:48 pm Post subject: |
|
|
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 |
|
|
|