I've been searching for a while now to try and find a solution but I finally gave up. I have a ubuntu server running an nfs share. I set it up so that you have to connect to it using ssh. which is awesome. the problem is that I can connect to it from any other linux machine without issues, but this Mac is kicking my rear end. here's how I'm connecting:

making the ssh tunnel: ssh -fNv -L 3049:localhost:2049 user@ssh.server.com -p 000

Connecting to the share: sudo mount_nfs -p 3049 localhost:/path/to/share /path/to/mount/share

I get a connection refused error on the mac, howevver on my linux machine It connects perfectly fine.

Help... please?

Rpcinfo on 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  52843  status
100024    1   tcp  33151  status
100003    2   tcp   2049  nfs
100003    3   tcp   2049  nfs
100003    4   tcp   2049  nfs
100227    2   tcp   2049
100227    3   tcp   2049
100003    2   udp   2049  nfs
100003    3   udp   2049  nfs
100003    4   udp   2049  nfs
100227    2   udp   2049
100227    3   udp   2049
100021    1   udp  58619  nlockmgr
100021    3   udp  58619  nlockmgr
100021    4   udp  58619  nlockmgr
100021    1   tcp  59210  nlockmgr
100021    3   tcp  59210  nlockmgr
100021    4   tcp  59210  nlockmgr
100005    1   udp  41289  mountd
100005    1   tcp  53372  mountd
100005    2   udp  45436  mountd
100005    2   tcp  52048  mountd
100005    3   udp  49309  mountd
100005    3   tcp  42610  mountd

NFS is working with some RPC daemons. According to the tag, I assume you're using NFSv4.

First, are you sure your mac is using v4 ? Are your RPC Daemons started on your Mac ? On Linux, you can get your daemon status with rpcinfo -p. You should at least have "portmapper", "mountd" and "nfs" on your server. You may also have "nlockmgr" for locking management and some others.

You can query what RPC programs are launched on a remote host with rpcinfo -p $targethost.

Please post the list of the rpc daemons running on your Mac.

|improve this answer|||||
  • I tried running rpcinfo on the mac and I received this: rpcinfo: RPC: Remote system error - Connection refused. I posted the rpcinfo for the server – GeneralCan Jul 26 '15 at 19:03
  • did you try running it as root (sudo) ? As I don't have a Mac to test, it may also indicate rpc server is not running. List available rpc daemons : sudo launchctl list | grep rpc and start them with sudo launchctl load $programname – Adrien M. Jul 26 '15 at 19:45

SO, this is what ended up working for me after countless hours trying to figure this thing out:

I knew everything was working fine on the erver side since I was ale to access the share from other linux computers, the problem was accessing it on MacOsx. so, after looking around for a while I found Fuse for Osx and the Sshfs package to go with it. I installed it and ran this command:

sshfs -p 0000 user@ssh.myserver.com:/path/to/share/in/server /path/to/mount/on/computer -oauto_cache,reconnect

was able to connect and working off it right now :).

BTW! if you're reading this in the future replace 000 with the port you're using or if using th default remove "-p 000" all together and set up your paths, you should be good to go.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.