DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

mount: mount to NFS server ’10.xx.x.xx’ failed: timed out (giving up)

March 21, 2018 DbAppWeb Admin

Problem

I had an NFS server from which some folders were shared with client servers. Shared folders were mounted on the client servers. Due to some hardware problem in the NFS server, the server suddenly becomes dead and after that, I created and configured a new NFS server. But when I tried to mount the NFS shared folders on client machines I got the below error:

[root@nfs-client ~]# mount -o tcp 10.22.1.22:/pdfdocs/etender /home/bv1to1/bvdocroot/ireps/etender
mount: mount to NFS server '10.22.1.22' failed: timed out (giving up).

Reason

First, I have checked the firewall on my NFS server as well as on NFS-client and found that the firewall on both the systems was off. I was getting the above error because of a dynamic mountd port. I got this information by using -v option with the mount command.

[root@nfs-client ~]# mount -v -o tcp 10.22.1.22:/pdfdocs/etender /home/bv1to1/bvdocroot/ireps/etender
mount: no type was given - I'll assume nfs because of the colon
mount: trying 10.22.1.22 prog 100003 vers 3 prot tcp port 2049
mount: trying 10.22.1.22 prog 100005 vers 3 prot tcp port 51711
mount: Unable to connect to 10.22.1.22:51711, errno 110 (Connection timed out)
mount: mount to NFS server '10.22.1.22' failed: timed out (giving up).

For more details on the ports are being used in the NFS, use the below command:

[root@nfs-server ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  33754  status
    100024    1   tcp  45135  status
    100011    1   udp    875  rquotad
    100011    2   udp    875  rquotad
    100011    1   tcp    875  rquotad
    100011    2   tcp    875  rquotad
    100005    1   udp  48180  mountd
    100005    1   tcp  60470  mountd
    100005    2   udp  46381  mountd
    100005    2   tcp  54662  mountd
    100005    3   udp  36271  mountd
    100005    3   tcp  51711  mountd
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100021    1   udp  41543  nlockmgr
    100021    3   udp  41543  nlockmgr
    100021    4   udp  41543  nlockmgr
    100021    1   tcp  56118  nlockmgr
    100021    3   tcp  56118  nlockmgr
    100021    4   tcp  56118  nlockmgr

The above problem which I got was due to the dynamic MOUNTD_PORT port if I make it static then my problem will be solved. Dynamic ports also will not be telnet from the client machine.

Solution

First, make the MOUNTD_PORT port static by editing the file /etc/sysconfig/nfs.

[root@nfs-server ~]# vi /etc/sysconfig/nfs

Remove the # from the line containing MOUNTD_PORT to make the MOUNTD_PORT static (892)

# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
MOUNTD_PORT=892
#

Restart the NFS services by using the below command:

[root@nfs-server ~]# service nfs stop
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Shutting down RPC idmapd:                                  [  OK  ]
[root@nfs-server ~]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]

Verify the mountd port using rpcinfo command:

[root@nfs-server ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  33754  status
    100024    1   tcp  45135  status
    100011    1   udp    875  rquotad
    100011    2   udp    875  rquotad
    100011    1   tcp    875  rquotad
    100011    2   tcp    875  rquotad
    100005    1   udp    892  mountd
    100005    1   tcp    892  mountd
    100005    2   udp    892  mountd
    100005    2   tcp    892  mountd
    100005    3   udp    892  mountd
    100005    3   tcp    892  mountd
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100021    1   udp  44137  nlockmgr
    100021    3   udp  44137  nlockmgr
    100021    4   udp  44137  nlockmgr
    100021    1   tcp  37292  nlockmgr
    100021    3   tcp  37292  nlockmgr
    100021    4   tcp  37292  nlockmgr

Telnet the port 892 from the client machine and it will be successful. Now try to mount the NFS shared folder on the client machine and it will be successful

[root@nfs-client ~]# mount -v -o tcp 10.22.1.22:/pdfdocs/etender /home/bv1to1/bvdocroot/ireps/etender
mount: no type was given - I'll assume nfs because of the colon
mount: trying 10.22.1.22 prog 100003 vers 3 prot tcp port 2049
mount: trying 10.22.1.22 prog 100005 vers 3 prot tcp port 892

Verify the mount point:

[root@nfs-client ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              95G   22G   69G  25% /
/dev/sda5              84G  1.1G   79G   2% /var
/dev/sda1             244M   17M  215M   8% /boot
tmpfs                 4.9G     0  4.9G   0% /dev/shm
10.22.1.22:/pdfdocs/etender
                       50G   14G   33G  30% /home/bv1to1/bvdocroot/ireps/etender

Note: In the above case, the NFS server was an RHEL 6.8 machine and the nfs-client was an RHEL 5.5 machine.  

Prev Article
Next Article
Tags:File System Linux Mountings NFS Sys Admin

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com