NFS mount over SSH: Unable to receive; errno = Connection refused
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NFS mount over SSH: Unable to receive; errno = Connection refused
Hi Guys,
I'm trying to mount a directory from my vps box on my local machine. The vps is running Ubuntu feisty, the local machine is Ubuntu edgy.
When I try to mount the share on my local machine I get:
Code:
work@barney:/media# sudo mount repo
mount: RPC: Unable to receive; errno = Connection refused
mount: backgrounding "localhost:/home/repo"
On the face of it, it looks like an nfs process (I'm just learning nfs too so I'm not quite sure which processes are involved in the mount, just that you need some daemons running to act as a client as well as those required for the server) can't see a service from the server.
I've confirmed that both mountd and nfs are visible to the client and are specified properly in the fstab entry:
Thanks for the reply pingu, I've tried various combinations of 127.0.0.1, the ip of the vps, and 0.0.0.0/0 all have had the same result (including each of them on the export line alone)
Quote:
Originally Posted by pingu
On server, /etc/exports:
You can't specify two on one line.
I suggest you remove the "0.0.0.0...." and change 127.0.0.1 to 0.0.0.0
Is this something you've had fail in the past? I believe it's not true as the (5 exports) man page states the opposite:
Quote:
Each line contains an export point and a whitespace-separated list of
clients allowed to mount the file system at that point.
Sorry about that, I read a bit too hasty.
You're right, I now tried it and it exports fine your way.
A little experimentation gives me this:
using 0.0.0.0/0 in /etc/exports renders an error message:
"exportfs: invalid netmask `0' for 0.0.0.0"
With this line in /etc/exports:
"/home/pingu 10.10.10.0/24"
I can mount it fine with a normal mount command,
"mount 10.10.10.2:/home/pingu /mnt/tf"
Thinking of two things:
1) In /etc/exports, you must specify the ip or hostnames etc that are allowed to mount - not the servers ip. Also netmask '0' is not allowed.
Sorry about that, I read a bit too hasty.
You're right, I now tried it and it exports fine your way.
A little experimentation gives me this:
using 0.0.0.0/0 in /etc/exports renders an error message:
"exportfs: invalid netmask `0' for 0.0.0.0"
How were you able to get this error out of the service? My hope with adding that 'host' to exports was to rule out host-based resrictions being what was stopping me getting this going. I'd like to add the securty measures in once it's working and I've got a better understanding of how it fits together.
I've been playing around with adding some switches to rpc.nfsd & rpc.mountd in /etc/init.d/nfs-user-server in the hope of getting some useful log chat from one of the daemons (like -d auth to get auth failures; no luck on that front there's nothing added to the log when I try and mount). Also the -p switch is supposed to put the service into promiscuous mode where it will servce any host on the network, but doesn't seem to help me.
Quote:
Originally Posted by pingu
With this line in /etc/exports:
"/home/pingu 10.10.10.0/24"
I can mount it fine with a normal mount command,
"mount 10.10.10.2:/home/pingu /mnt/tf"
Same result after adding a /24 address to exports
Quote:
Originally Posted by pingu
Thinking of two things:
1) In /etc/exports, you must specify the ip or hostnames etc that are allowed to mount - not the servers ip. Also netmask '0' is not allowed.
2) Is there no support for nfs on the system?
1) Since the request turns up to the vps host over an ssh forwarded port it will have a source ip of either the local ethernet interface or the loopback address (I think it's the ethernet if, but I'm not certain)
2) I'm wondering if that's the case but I can't find something solid to tell me that's the case, I'm currently working on the assumption I'm just missing something
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.