Can't sync certain files with SFTP

Get help for specific problems
Posts: 5
Joined: 22 Apr 2018

KarstenP

Hi!
From time to time I get SFTP errors during syncing in a batch:

LIBSSH2_ERROR_SFTP_PROTOCOL: SFTP Protocol Error - LIBSSH2_FX_NO_SUCH_FILE [libssh2_sftp_rename_ex]

When using the desktop UI, the respective files are shown, but syncing fails (see attachment). I always have to solve these issues manually.
Is this problem related to FFS or the server (Synology Diskstation)? I can access the files (copy) with WinSCP without any problem. Perhaps it is due to the german umlaut in the path? But the umlaut is shown correctly in the UI...

Karsten
Fehler FFS.png
Fehler FFS.png (68.13 KiB) Viewed 2012 times
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Can you retry with the latest FFS version 10.0? It might give a more detailed error message. Are you able to reproduce this problem consistently? Can you manually check why the rename failed: It's possible that either the file at the source path or the target folder were missing.
Posts: 5
Joined: 22 Apr 2018

KarstenP

Yes, I can reproduce the problem with these files consistently. And it still happens with version 10.0. According to the detailed error message, authentication fails (see screenshot). All other files are synced with no problem at all, even files with Umlauts in its path or filename. Why does authentication fail for certain files...?

BTW: Does FFS login for every file? I recently found out, that the ip address of my PC was blocked on the NAS due to too many logins since a couple of days. (default for Synology Diskstation is more than 10 in 5 minutes) I needed to whitelist the ip address. The errors in the screenshot below happened after whitelisting!
Attachments
Fehler FFS.png
Fehler FFS.png (59.47 KiB) Viewed 1940 times
Posts: 5
Joined: 22 Apr 2018

KarstenP

Zenju, I also checked your last hint now. The target directory was missing. (That's OK, because there was nothing for versioning before.) After creating it manually on the NAS, the sync succeeded now!
I'm pretty sure FFS sees it as its task to create the directory during sync. So why is the directory still missing when FFS tries to move the old file?


P.S.: Why can't the forum search find the error message "LIBSSH2_FX_NO_SUCH_FILE"? That's why I have overlooked this topic so far. Sorry! Seems to be an unsolved issue with SFTP.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

I'm pretty sure FFS sees it as its task to create the directory during sync. KarstenP, 02 Jun 2018, 09:33
Yes. I assume the original connection was considered broken after failing to move to the target folder, even though a missing target folder is a recoverable error. This can happen if the connection didn't produce a successful call for at least 20 seconds. (Maybe you have retry enabled with a long delay???)
A second connection is attempted to create the missing target folder, but then fails due to connnection limits on your server because the old connection is not immediately closed: LIBSSH2_ERROR_AUTHENTICATION_FAILED
P.S.: Why can't the forum search find the error message "LIBSSH2_FX_NO_SUCH_FILE"? KarstenP, 02 Jun 2018, 09:33
You found a phpBB bug! (Or is it a feature? :> Underscores were considered as word separators). I've implemented a fix, so this will be working from now on.
That's why I have overlooked this topic so far. KarstenP, 02 Jun 2018, 09:33
Yes, the first part is probably the same issue, while the second one is about case-sensitivity.

I've implemented a fix to close broken sessions immediately and to avoid creating excess sessions. Can you test your scenario with the following version?
http://www.mediafire.com/file/rkagr7zl82z7vv3/FreeFileSync_10.2_%5BBeta%5D_Windows_Setup.exe
Posts: 5
Joined: 22 Apr 2018

KarstenP

Sorry for the long delay, but I had to wait for the problem occurring again, after I had manually fixed it for the three files mentioned in my first post.

Now the problem is back for another file and I upgraded FFS from version 10.0 to 10.3 to test your fix. Unfortunately the problem is NOT solved. I still can't sync this certain file (others work flawlessly), error message is the same as before:

2018-08-31 11_58_28-Window.png
2018-08-31 11_58_28-Window.png (24.45 KiB) Viewed 1749 times

Again, it is the first time this file is versioned, so the directory does not exist yet. I did not solve the problem manually, so I can reproduce the error any time, in case you want me to test something.

BTW: This FFS version is much faster than before...
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

There are at least two things I don't understand about this error:
1. Is FreeFileSync hitting your Diskstation's connection limits? The second part of the message would indicate that.
2. Why is FreeFileSync attempting to connect in first place? Is it possible that the last successful call to the SFTP server was more than 20 seconds ago (= FFS's max allowed idle time for SFTP)?
Posts: 5
Joined: 22 Apr 2018

KarstenP

1. Is FreeFileSync hitting your Diskstation's connection limits? The second part of the message would indicate that. Zenju, 31 Aug 2018, 16:13
I don't think so. Synchronization fails, even though there is only this file different. Otherwise it works perfectly, when there are hundreds of files pending.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

I don't think so. Synchronization fails, even though there is only this file different. Otherwise ist works perfectly, when there a hundreds of files pending. KarstenP, 02 Sep 2018, 16:46
Is there some log on the Diskstation that shows the number of connections or other errors?