LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-09-2009, 05:15 PM   #1
comforteagle
LQ Newbie
 
Registered: Jan 2004
Distribution: redhat/mandrake/YD/SuSE
Posts: 4

Rep: Reputation: 0
nfs times out


I'm trying to get nfs running on two ubuntu intrepid machines

following the instructions here:
http://czarism.com/easy-peasy-ubuntu...s-file-sharing

is there any reason, with iptables flushed!!! & being able to telnet -ports 111, 2049, to the server from client , that I should get:
Code:
mount.nfs: mount to NFS server '10.252.99.223' failed: timed out, retrying
mount.nfs: mount to NFS server '10.252.99.223' failed: timed out, giving up

I cannot find an answer explaining this.

Last edited by comforteagle; 01-09-2009 at 05:15 PM. Reason: touch up
 
Old 01-09-2009, 10:35 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
In order to get another machine to respond to your NFS mount request, that machine must be running a daemon named nfsd. On many systems, this is not started by default, so unless you have made a change to the default configuration for this daemon, it is probably not running.

To find out, on the target machine, do this:
Code:
#netstat -atnp
Check that the daemon rpcbind is listening on TCP port 111. Then check that nfs daemon threads are running:
Code:
#ps aux|grep nfsd
There should be several lines indicating that nfs daemon threads are running (in the kernel).

If these are not running, you have found your problem. Start them up:
Code:
#/etc/init.d/nfs start
and then do whatever configuration your machine supports to make nfs start up on boot. This might be a graphical UI to configure services, or it might be a command-line sequence. My preference is to use the command-line chkconfig style of daemon control, but then I am an unreconstructed old codger.

If these services are already running, you should check the file /etc/exports on the target machine to make sure that it is willing to offer the part of the file system you are looking for as an NFS export. If you change the contents of this file, remember to let the system know about it:
Code:
#exportfs -a
 
Old 01-10-2009, 07:51 AM   #3
comforteagle
LQ Newbie
 
Registered: Jan 2004
Distribution: redhat/mandrake/YD/SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
thanks, but not it. yet.

Quote:
Originally Posted by dkm999 View Post
In order to get another machine to respond to your NFS mount request, that machine must be running a daemon named nfsd. On many systems, this is not started by default, so unless you have made a change to the default configuration for this daemon, it is probably not running.

To find out, on the target machine, do this:
Code:
#netstat -atnp
Check that the daemon rpcbind is listening on TCP port 111. Then check that nfs daemon threads are running:
Code:
#ps aux|grep nfsd
There should be several lines indicating that nfs daemon threads are running (in the kernel).

If these are not running, you have found your problem. Start them up:
Code:
#/etc/init.d/nfs start
and then do whatever configuration your machine supports to make nfs start up on boot. This might be a graphical UI to configure services, or it might be a command-line sequence. My preference is to use the command-line chkconfig style of daemon control, but then I am an unreconstructed old codger.

If these services are already running, you should check the file /etc/exports on the target machine to make sure that it is willing to offer the part of the file system you are looking for as an NFS export. If you change the contents of this file, remember to let the system know about it:
Code:
#exportfs -a
Thanks you so much for taking the time to reply with such detail!

netstat -atnp|grep 111
reveals: tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 4588/portmap

Also, ps aux|grep nfs reveals:
Code:
root     17094  0.0  0.0   7496   828 pts/0    S+   13:45   0:00 grep nfs
root     31521  0.0  0.0      0     0 ?        S<   02:36   0:00 [nfsd4]
root     31522  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31523  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31524  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31525  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31526  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31527  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31528  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
root     31529  0.0  0.0      0     0 ?        S    02:36   0:00 [nfsd]
So that's running.

/etc/exports contents:
Code:
/mnt/testing 10.252.174.175(rw,sync,no_root_squash,no_subtree_check)
seems fine.

I've also
exportfs -a, and restarted both nfs-kernel-server & nfs-common services, to no avail.

Further I've added the client machine to the server's /etc/hosts file, just in case.

Result: timed out, failed.

Now what? (Thanks for your help!)
 
Old 01-10-2009, 01:15 PM   #4
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
The mystery deepens.

I guess the next things I would look at are these:
1. Is mountd running on your client machine? (It may be called rpc.mountd).
2. Are there any complaints in the syslog (probably /var/log/messages)?

If mountd is running, and there are no relevant complaints, I guess that the next step might be to try to trace the interaction using tcpdump, so that we can see where the transaction breaks down. In case you are not familiar with this program, it will trap selected IP packets and report them for you. In this case, I would first set it up on the client machine
Code:
# tcpdump -nn -xX -s 256 host 10.252.99.223
When you attempt the mount, the result should be a sequence of packet exchanges between your client and the server. If, as I guess, there is only one packet trapped, then go to the server, and repeat the experiment there, to see what the server is actually seeing (of course, you will have to change the address in the tcpdump command to trap interactions with the client). It is possible that the packets are not actually going where you expect them to go, and that the server is not seeing them. This would cause the timeout for certain.

Good luck.
 
Old 01-10-2009, 02:45 PM   #5
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
Here's the setup that works for me:

I use NFS between my Desktop and Laptop as my server. Both being on the same LAN. On the server there must be an /etc/exports with the following. Replace the fields in {} with your information. In my example I'm giving access to the entire home folder tree. This scheme works with any mix of 8.04 and 8.10. There can be multiple entries giving more clients permission.

/home/{Laptop user} {Desktop hostname}.local(rw)

This allows the Desktop to access the home folder of the laptop. Prior to Ubuntu 8.04 you need to run "sudo exportfs -rv" for the system to read /etc/exports. New versions do this for you at boot.

On the Desktop create a folder to mount to. In my case I placed that folder in my home folder.

On the Desktop side I run

sudo mount {Laptop hostname}.local:/home/{Laptop user} /home/{Desktop user}/{folder to mount to}

To un-mount I run

sudo umount {Laptop hostname}.local:/home/{Laptop user} /home/{Desktop user}/{folder to mount to}

You can extrapolate what to do from this working example. I chose not to use fstab to mount and wrote a couple of bash scripts that supply the parameters to the mount and umount commands.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Data transfer online is slow "at times" or "stops at times" Balarabay1 SUSE / openSUSE 14 04-30-2006 10:00 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 06:55 PM
Extremely slow mount times for NFS wayloud Linux - Networking 2 06-04-2005 12:58 AM
nfs mount times out gtkmike Linux - Networking 1 11-15-2003 10:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration