Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHFS -o reconnet not working #51

Open
sganis opened this issue Aug 8, 2018 · 1 comment
Open

SSHFS -o reconnet not working #51

sganis opened this issue Aug 8, 2018 · 1 comment

Comments

@sganis
Copy link

sganis commented Aug 8, 2018

The -o reconnect option is not working, it does not survive a short network disconnection.
To reproduce, connect using the command line, then unplug the network for a moment and plug again.
The terminal hangs for some time, and the this error appears:

failed to fork: Resource temporarily unavailable
read: Software caused connection abort
      2 [main] sshfs 8440 fork: child -1 - forked process 11836 died unexpectedly, 
      retry 0, exit code 0xC0000142, errno 11

The ssh.exe process does not start again. I think this issue is the same as #49.

I tried autossh using this command line option: -o ssh_command=autossh -M 0 -vv, but although it keeps the ssh.exe alive and trying to reconnnect, it does not restore the sshfs activity and the drive remains unavailable.

My setup:

WinFsp-FUSE version 2.8
SSHFS version 2.7
OpenSSH_7.5p1, OpenSSL 1.0.2k  26 Jan 2017
Local Windows 10
Remote Centos 7

My sshfs command line:

sshfs.exe [email protected]:/ Z: -f -o reconnect -ouid=-1,gid=-1
    -oVolumePrefix=/sshfs/[email protected] -oStrictHostKeyChecking=no 
    -oServerAliveInterval=10 -oServerAliveCountMax=10000 
@felipecrs
Copy link
Contributor

felipecrs commented Dec 23, 2024

I am working around it with a PowerShell wrapper that automatically restarts the command if it exits.

PowerShell.exe -NoProfile -Command "while ($true) { & 'C:\Program Files\SSHFS-Win\bin\sshfs-win.exe' svc \sshfs.kr\myhost U:; Write-Host 'SSHFS exited, restarting in 10 seconds...' -ForegroundColor Red; Start-Sleep -Seconds 10 }"

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

No branches or pull requests

2 participants