You are not logged in.

#1 2018-07-29 01:49:27

Klemvor
Member
From: Italy
Registered: 2012-09-29
Posts: 20

[UPDATED] sshfs disconnection?

Dear all, I have a remote server where I use to store my backups, music and video files. On my local machine I mount the remote directories through sshfs with the following fstsb entry style:

monty@myserver.duckdns.org:/srv/RemoteDirectory  /media/LocalDirectory  fuse.sshfs delay_connect,port=22022,_netdev,user,reconnect,follow_symlinks,identityfile=/var/lib/monty/.ssh/key,allow_other,gid=100 0 0

The media files are then accessed throught the media center Kodi.  Everything was going fine, but about one week ago I started having some weird problems: the media center stuck at some point and even though the directories are still mounted according to the output of mount the files can no longer be accessed. At first I thought it was a Kodi problem, but upon trying to the same with my laptop I've got the same problem: at some point the reproduction stops, everything is still mounted, but the remote directories are no longer accessible. I thought it was a problem of my network, so I tried reproducing the behaviour while constantly pinging some address. However ping never showed any disconnection, while the problem represented itself. I thought it was a problem of my remote sever, so I tried reproducing the behaviour while being connected to it through standard ssh. Again the ssh connection was fine, but the media playing through sshfs got stuck and there was no way of re-establish a working connection. I would like to understand the origin of this kind of problem and possibly solve it. Especially I'm wondering why only sshfs seems to be affected by this behaviour. The average speed of my connection is given by this speedtest:
7508363537.png
If you know any other kind of tests and/or solutions which I can try please tell me.

A SMALL UPDATE: Trying to copy files I observed that the copy at some point stops, but then resume at ridiculously slow speed (2-8kb/s). I don't if this behaviour is due to disconnection or other causes. In any case I would appreciate if someone can give me some hints on what's going on.

Last edited by Klemvor (2018-07-29 07:17:20)


“Violence,” came the retort, “is the last refuge of the incompetent.”
- I. Asimov -

Offline

#2 2018-08-04 19:15:56

newsboost
Member
Registered: 2016-07-24
Posts: 157

Re: [UPDATED] sshfs disconnection?

Maybe you need some kind of "keep alive"-signal to SSH, so it keeps the connection open, just a quick guess. Maybe the configuration sshd.conf can explain something. I personally use NFS from my Synology NAS, because it's faster (maybe no encryption, I'm not sure), however not sending stuff over the internet, only LAN.

Offline

#3 2018-08-04 21:03:12

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [UPDATED] sshfs disconnection?

resume at ridiculously slow speed (2-8kb/s)

https://bbs.archlinux.org/viewtopic.php … 8#p1798038 ?

Offline

#4 2018-08-05 08:41:55

Klemvor
Member
From: Italy
Registered: 2012-09-29
Posts: 20

Re: [UPDATED] sshfs disconnection?

newsboost wrote:

Maybe you need some kind of "keep alive"-signal to SSH, so it keeps the connection open, just a quick guess.

I checked the options. One can try modifying the option TCPKeepAlive, but it is quite risky, especially for scripts. On the other hand the connection seems to stay up, just it slows down a lot.

newsboost wrote:

Maybe the configuration sshd.conf can explain something. I personally use NFS from my Synology NAS, because it's faster (maybe no encryption, I'm not sure), however not sending stuff over the internet, only LAN.

I understand your point, and I agree. The encryption required by ssh slows down the procedure, but as far as I know it is the only reliable method to send data over the internet.

seth wrote:

Download speed in general stays unaltered, only the data going coming from sshfs are affected by this slow down. Anyway I'll try to set the parameter "net.ipv4.tcp_ecn" to 0 to see if something happens.


“Violence,” came the retort, “is the last refuge of the incompetent.”
- I. Asimov -

Offline

Board footer

Powered by FluxBB