After Mac sleep: "status changed for fs" "Failed to Mount" #29

Closed
nottoseethesun opened this Issue May 2, 2012 · 14 comments

Comments

Projects
None yet
3 participants

Using MacFusion with OSXFuse with SSHFS, and clicking on MacFusion 'mount' after waking MacBook Pro Snow Leopard up-to-date (but in 32-bit mode) from sleep, I get a GUI window that says, "Could not mount filesystem: Authentication has failed."

However, the log (below) says authentication succeeded but the filesystem could not be mounted:

  "Note status changed for fs" "Failed to Mount".  

Otherwise, my MacFusion/OSXFuse/sshfs set-up works fine: For example, if I reboot, I am then able to connect.

This could be caused by not unmounting before putting the Mac to sleep. If so then a hook would be needed to cleanly unmount on sleep.

Log:

(SSHServerFS, cbalz_rhel_box_...n, 5/2/12 9:35 40AM) debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.

(SSHServerFS, cbalz_rhel_box_...n, 5/2/12 9:35 40AM) debug1: Sending subsystem: sftp

(MFClient, cbalz_rhel_box_...n, 5/2/12 9:35 40AM) Note status changed for fs <MFClientFS: 0x20008b9e0> (cbalz_rhel_box_...n) to Failed to Mount

(SSHServerFS, cbalz_rhel_box_...n, 5/2/12 9:35 40AM) debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 2 clearing O_NONBLOCK
Transferred: sent 2256, received 2072 bytes, in 0.0 seconds
Bytes per second: sent 163253.7, received 149938.7
debug1: Exit status 0

Steps to Reproduce:

  1. Install MacFusion with OSXFuse, using sshfs, on MacBook Pro with up-to-date Snow Leopard (Mac OS X 10.6.8 (10K531), Darwin 10.8.0, 64-bit Kernel and Extensions:No, Secure Virtual Memory:Enabled, Boot Mode:Normal) and follow all the instructions on the set-up page.
  2. Verify installation working correctly with an sshfs mount (not sftp).
  3. Put Mac to sleep (sleep mode - e.g., close lid)
  4. Wake Mac (open lid)
  5. Bring MacFusion to focus
  6. Click "Mount"

Confirming that the issue is not seen if the volume is unmounted before Mac 'sleep'. However, since the only obvious fix for the user upon Mac 'wake' when the volume was not unmounted is to reboot, this would be good to fix.

Owner

bfleischer commented May 7, 2012

I looked into this issue but I'm unable to reproduce it on Leopard and Lion. Currently I don't have a Mac running Snow Leopard around for testing. But I think this shouldn't make much of a difference.

Can you try to reproduce the issue using the sshfs binary from command line to rule out Macfusion? Maybe the issue is related to the SSH server that is used. I used Macs running Leopard and Lion.

However, since the only obvious fix for the user upon Mac 'wake' when the volume was not unmounted is to reboot, this would be good to fix.

I can't be sure but I assume that running umount in Terminal and/or killing the sshfs process might be enough to recover from this issue. Have you tried to do this?

This could be caused by not unmounting before putting the Mac to sleep. If so then a hook would be needed to cleanly unmount on sleep.

The question is where such a hook should be implemented. In Macfusion or in SSHFS? I don't think that SSHFS is the right place. For Macfusion you would have to talk to its author but there hasn't been any Macfusion update in a long time.

Owner

bfleischer commented May 22, 2012

Any news?

Unmounting before sleep seems to be a good workaround. I have several co-workers with the same issue, but unmounting before sleep seems to work.

I am currently running this sshfs:

oughtpurple-lm:~ cbalz$ which sshfs
/opt/local/bin/sshfs
oughtpurple-lm:~ cbalz$ sshfs --version
SSHFS version 2.4
fuse4x library version: FUSE 2.8.7 / fuse4x 0.9.0
fuse: no mount point
oughtpurple-lm:~ cbalz$

Not sure how to use the sshfs binary from the command line to test this.

I do seem to remember once when, even though I'd unmounted before putting the Mac to sleep, I had the issue. But I did not remember to do 'umount' in Terminal and/or kill the sshfs process. If it happens again, I will have to remember!

I will also check in with my several co-workers who are affected by this issue. For corporate use of Mac, it usually takes a while to do an upgrade such as from Snow L. to Lion.

bfleischer was assigned May 22, 2012

Owner

bfleischer commented May 29, 2012

Sorry for replying this late. I have been busy.

oughtpurple-lm:~ cbalz$ which sshfs
/opt/local/bin/sshfs
oughtpurple-lm:~ cbalz$ sshfs --version
SSHFS version 2.4
fuse4x library version: FUSE 2.8.7 / fuse4x 0.9.0
fuse: no mount point

This is a Fuse4X version of SSHFS installed though MacPorts. Fuse4X is a MacFUSE fork like OSXFUSE but not the same as OSXFUSE.

How exactly did you setup Macfusion? Did you follow this guide? https://github.com/osxfuse/osxfuse/wiki/SSHFS

Not sure how to use the sshfs binary from the command line to test this.

Its important that you use the SSHFS version that is used by Macfusion. In case you followed the above guide you should be able to mount you SSHFS volume by running:

mkdir /Volumes/SSHFS
/usr/local/bin/sshfs username@host:/path/to/dir /Volumes/SSHFS

where host is the name or IP-address of the remote host you want to connect to, username is your username on the remote host and /path/to/dir is the path to the remove directory you want to mount. /Volumes/SSHFS is the mount point the remote directory will be mounted on.

Owner

bfleischer commented Jun 5, 2012

Has this issue been resolved? Can it be closed?

Lately, after some Snow Leopard system updates and MacPorts selfupdate, I have been able to even sleep the computer and wake it with no mount problem. This has worked in both 32-bit and 64-bit modes.

I can confirm that I did, from the outset, set up MacFusion using this guide: https://github.com/osxfuse/osxfuse/wiki/SSHFS

If I have any more issues, I will fix my $PATH so that I am using the OSXFUSE SSHFS.

To sum up, it seems that MacPorts selfupdate and/or changes with the recent Snow Leopard updates (past month or so) have fixed this issue. Additionally, the issue could have been the Fuse4x version of SSHFS that MacPorts had installed. So I would say this issue can be closed.

nottoseethesun reopened this Jun 6, 2012

This issue happened again today so I re-followed the instructions here https://github.com/osxfuse/osxfuse/wiki/SSHFS and also made sure my path was set to pull the correct sshfs.

oughtpurple-lm:Resources cbalz$ sshfs --version
SSHFS version 2.4 (OSXFUSE SSHFS 2.4.1)
OSXFUSE library version: FUSE 2.7.3 / OSXFUSE 2.3.9
no mount point
oughtpurple-lm:Resources cbalz$

oughtpurple-lm:~ cbalz$ which sshfs
/usr/local/bin/sshfs
oughtpurple-lm:~ cbalz$ cd /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources
oughtpurple-lm:Resources cbalz$ ls -ail
total 288
114052116 drwxr-xr-x 9 cbalz staff 306 Jun 6 10:55 .
114052112 drwxr-xr-x 5 cbalz staff 170 Dec 3 2010 ..
114052117 -rwxr-xr-x 1 cbalz staff 42928 Dec 3 2010 new_sshfs_askpass
122209121 lrwxr-xr-x 1 cbalz staff 20 Jun 6 10:55 sshfs-static -> /usr/local/bin/sshfs
118990537 lrwxr-xr-x 1 cbalz staff 20 Apr 27 12:25 sshfs-static.orig -> /usr/local/bin/sshfs
114052119 -rw-r--r-- 1 cbalz staff 13259 Dec 3 2010 sshfs.png
114052121 -rw-r--r-- 1 cbalz staff 6978 Dec 3 2010 sshfsAdvanced.nib
114052122 -rw-r--r-- 1 cbalz staff 7872 Dec 3 2010 sshfsConfiguration.nib
114052120 -rw-r--r-- 1 cbalz staff 61418 Dec 3 2010 sshfs_icon.icns
oughtpurple-lm:Resources cbalz$

oughtpurple-lm:~ cbalz$ open -a macfusion

I click the mount button, and get: fail to mount with error message: "Could not mount filesystem: Authentication has failed."

Owner

bfleischer commented Jun 10, 2012

Could you please try to mount your SSHFS volume using Terminal and the sshfs binary instead of Macfusion?

Finally able to revisit this: I have just now done the above (mount SSHFS volume using Terminal and the sshfs binary instead of MacFusion). It worked, although at this time, so did MacFusion GUI.

I will try that again when the problem again appears. It is intermittent, sometimes appearing after sleep. I've probably seen the issue about ten times in the past two months.

Owner

bfleischer commented Jan 10, 2013

Closed due to inactivity.

bfleischer closed this Jan 10, 2013

Thanks I thought I'd replied to the queries above - sorry my bad! So far so good with MacFusion.

Hi Benjamin,

Very sorry for forgetting about this thread - yes afaik it can be closed, as you have done: So far, MacFusion has been working fine.  Although, I have not used it heavily for a long time.  I may be using it more soon though.   

 - Chris B.

 
Chris M Balz
http://chrismbalz.typepad.com/futureproof_extended_now / http://chrismbalz.typepad.com/computerburn

". . . / This Cabinet is formd of Gold / And Pearl & Crystal shining bright And within it opens into a World / . . .
Another England there I saw / Another London with its Tower Another Thames & other Hills / And another pleasant Surrey Bower . . ."

  • from "The Crystal Cabinet", a poem by William Blake, in original spelling & grammar.

From: Benjamin Fleischer reply@reply.github.com
To: Christopher M Balz christopherbalz@yahoo.com
Sent: Tuesday, May 29, 2012 4:24 PM
Subject: Re: [osxfuse] After Mac sleep: "status changed for fs" "Failed to Mount" (#29)

Sorry for replying this late. I have been busy.

oughtpurple-lm:~ cbalz$ which sshfs
/opt/local/bin/sshfs
oughtpurple-lm:~ cbalz$ sshfs --version
SSHFS version 2.4
fuse4x library version: FUSE 2.8.7 / fuse4x 0.9.0
fuse: no mount point

This is a Fuse4X version of SSHFS installed though MacPorts. Fuse4X is a MacFUSE fork like OSXFUSE but not the same as OSXFUSE.

How exactly did you setup Macfusion? Did you follow this guide? https://github.com/osxfuse/osxfuse/wiki/SSHFS

Not sure how to use the sshfs binary from the command line to test this.

Its important that you use the SSHFS version that is used by Macfusion. In case you followed the above guide you should be able to mount you SSHFS volume by running:

    mkdir /Volumes/SSHFS
    /usr/local/bin/sshfs username@host:/path/to/dir /Volumes/SSHFS

where host is the name or IP-address of the remote host you want to connect to, username is your username on the remote host and /path/to/dir is the path to the remove directory you want to mount. /Volumes/SSHFS is the mount point the remote directory will be mounted on.


Reply to this email directly or view it on GitHub:
#29 (comment)

evisong commented May 5, 2016 edited

#45 (comment)

In my case, osxfuse/macfusion cannot resume after Mac wake up from a sleep, moreover I always fail to re-mount unless I reboot the Mac.

hdiutil eject -force <full mount path>

This solution works for me, I can re-mount after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment