Hi, I seem to be having issues starting up an nfs server inside a jail. When the jail starts, only rpcbind comes up automatically, while nfsd and mountd does not.
I get the following error in messages when I try starting nfsd manually. While mountd can be started manually with no issues.
Jail host config.
Jail config.
I get the following error in messages when I try starting nfsd manually. While mountd can be started manually with no issues.
Code:
fs6# nfsd -u -t -n 4
fs6# cat /var/log/messages
May 3 21:33:18 fs6 syslogd: kernel boot file is /boot/kernel/kernel
May 3 21:33:18 fs6 rpcbind: cannot create socket for udp6
May 3 21:35:19 fs6 nfsd[1180]: nfssvc: Operation not permitted
May 3 21:35:19 fs6 nfsd[1183]: nfssvc: Operation not permitted
May 3 21:35:19 fs6 nfsd[1181]: nfssvc: Operation not permitted
May 3 21:35:19 fs6 nfsd[1182]: nfssvc: Operation not permitted
May 3 21:35:19 fs6 nfsd[1179]: can't Add UDP socket
Jail host config.
Code:
blueprint# cat /etc/rc.conf
zfs_enable="YES"
hostname="blueprint.domain.local"
keymap="us.iso"
ifconfig_em0="inet 192.168.0.2 netmask 255.255.255.0"
ifconfig_em0_alias0="192.168.0.6 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
# Daemon Config
sshd_enable="YES"
apcupsd_enable="YES"
syslogd_flags="-b 192.168.0.2"
# Jail Config
jail_enable="YES"
jail_list="exports"
# Exports Jail
jail_exports_rootdir="/jails/exports"
jail_exports_hostname="fs6.domain.local"
jail_exports_ip="192.168.0.6"
jail_exports_devfs_enable="YES"
jail_exports_devfs_ruleset="devfsrules_jail"
blueprint# sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
baz sshd 1153 3 tcp4 192.168.0.2:22 192.168.1.2:60356
root sshd 1151 3 tcp4 192.168.0.2:22 192.168.1.2:60356
root sendmail 816 3 tcp4 127.0.0.1:25 *:*
root sshd 801 3 tcp4 192.168.0.2:22 *:*
root syslogd 573 6 udp4 192.168.0.2:514 *:*
Jail config.
Code:
fs6# cat /etc/rc.conf
hostname="fs6.domain.local"
network_interfaces=""
defaultrouter="192.168.0.1"
sshd_enable="YES"
# nfs
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r -h 192.168.0.6"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
fs6# sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
baz sshd 1162 3 tcp4 192.168.0.6:22 192.168.1.2:60357
root sshd 1159 3 tcp4 192.168.0.6:22 192.168.1.2:60357
root sendmail 1062 3 tcp4 192.168.0.6:25 *:*
root sshd 1055 3 tcp4 192.168.0.6:22 *:*
root rpcbind 962 7 udp4 192.168.0.6:111 *:*
root rpcbind 962 8 udp4 192.168.0.6:806 *:*
root rpcbind 962 9 tcp4 192.168.0.6:111 *:*
root syslogd 947 6 udp4 192.168.0.6:514 *:*
fs6# rpcinfo -p
program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100000 4 local 111 rpcbind
100000 3 local 111 rpcbind
100000 2 local 111 rpcbind