I have to use nfs version 3 in org for bitbucket datacenter
I have followed bellow steps.
NFS Server Configuration Updates Edited /etc/default/nfs-kernel-server to disable NFS versions 2 and 4 and set a fixed port for mountd:
RPCMOUNTDOPTS="--manage-gids --port 9024" RPCNFSDOPTS="-N 4 -N 2"
Configured /etc/default/nfs-common to set fixed ports for statd and lockd:
NEED_STATD=yesSTATDOPTS="--port 9028 --outgoing-port 9029" LOCKD_OPTS="-p 9027 -o 9026"
Updated /etc/modprobe.d/lockd.conf to set specific TCP and UDP ports for lockd:
options lockd nlm_tcpport=9027 options lockd nlm_udpport=9028
Applied configurations and restarted services:
sudo systemctl restart nfs-kernel-server rpcbind sudo systemctl daemon-reload
Observations from rpcinfo -p Output: After applying the above configurations, the output of rpcinfo -p showed the following:
program vers proto port service100005 1 udp 40661 mountd100005 1 tcp 45805 mountd100005 2 udp 55256 mountd100005 2 tcp 50431 mountd100005 3 udp 34768 mountd100005 3 tcp 47275 mountd
Despite setting RPCMOUNTDOPTS="--port 9024"
in /etc/default/nfs-kernel-server, mountd continued to use random ports (e.g., 40661, 45805). This suggests the configuration may not have applied correctly.
The mounting error (mount.nfs: Connection timed out) may stem from the mountd service binding to random ports instead of the specified port (9024). This causes firewall and security group configurations to mismatch, resulting in a timeout during the mount attempt.
Please did I miss something? Do I need to modify anywhere to use fixed port for mountd?