0

I have this mount point configured in /etc/stab

sshfs#tomcat8@10.1.0.73:/opt/cache /opt/cache  fuse defaults,allow_other,nonempty,delay_connect  0 0

But seems it's not working as desired, as mount gets disconnect every now and then. Any ideas on which config file or log to look for possible diagnosis?

Reference OS:

uname -a
Linux tomcat-reports2 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.6 (jessie)
Release:    8.6
Codename:   jessie
  • can you check if manually mount without fstab works, and still disconnect? – darvark Mar 23 '17 at 17:24
  • it doesn't disconnect immediately, so actually cannot guarantee if it'll stay mounted if I remount it manually. By your suggestion, should I comment it out of fstab, mount it manually and just wait to see what happens? The problem with that is eventual server reboots. – Gonzalo Vasquez Mar 23 '17 at 17:28
  • Yes, the best option to debug is comment fstab, and do it manually, eventually add verbose mode to sshfs by -o sshfs_debug – darvark Mar 23 '17 at 17:32
1

Your connection is probably cut by a firewall due to inactivity (lack of TCP frames pertaining to the SSH connection). Try to enable keep-alive.

In your /etc/ssh/ssh_config, add:

TCPKeepAlive yes
ServerAliveInterval 30
ServerAliveCountMax 10
  • Sounds quite a good answer, as actually this setup is in AWS, between two different Availability Zones, where there obviously must exist a firewall in between. Will try it and let you know the results – Gonzalo Vasquez Mar 23 '17 at 17:51
  • added "metric" no monitor the results, will let you know what happens, thanks! – Gonzalo Vasquez Mar 24 '17 at 15:58

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.