SFTP not fully working
- Posts: 12
- Joined: 9 Dec 2015
I picked up a SFTP server on Mikrotik RB2011UAS-2HnD-IN. In settings "SSH File Transfer protocol" I typed all parameters and have successfully selected folder on the Mikrotik SSH server. But when I try to start synchronization, the program displays "Cannot find folder "sftp://xxxxx.ddns.ms/USB_Stick" ". At the same time using program WinSCP, all works fine. It appears that I can see the folders on the server, but can't copy to them.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
The SFTP folder picker is using the very same access routines like the synchronization process. Maybe it is a time-out issue? What (full) error message are you seeing?
- Posts: 12
- Joined: 9 Dec 2015
In error window just written: "Cannot find folder "sftp://xxxx.ddns.ms/USB_Stick"." Before display a message program thinks for a few seconds. It even start copying once, but i stopped operation and can't repeat it anymore. Always get this error. Maybe it is time-out, because folder-picker displays the folders within 5 seconds.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
After comparison, when starting the synchronization, FFS runs a second folder existence check. This is the very same test that runs after you press the comparison button. Generally, if you always pass the comparison in time (= in less than 20 seconds) then there is no reason why the second check should time out. I've updated the current beta to show a more detailed error instead. Let me know what you see with this version:
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
- Posts: 12
- Joined: 9 Dec 2015
New version display the same message "Cannot find folder "sftp://xxxxx.ddns.ms/USB_Stick"." After error I pressed 'Retry' button and files succesfully copied. Restarting sync again received error. But if I pressing 'Retry' several times, sync may start up.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
Okay, this means the error is not time-out related but caused by something else. Usually the only reason in this context why an "lstat" can fail is that the folder is in fact not existing. Here's a different test version showing the maximum level of error detail available. Again let me know the exact and full error message that you receive:
[404, Invalid URL: http://www.mediafire.com/download/a104vefb2kqeaza/FreeFileSync_7.8_beta_Windows_Setup.exe]
[404, Invalid URL: http://www.mediafire.com/download/a104vefb2kqeaza/FreeFileSync_7.8_beta_Windows_Setup.exe]
- Posts: 12
- Joined: 9 Dec 2015
Folder sure exist on server. New version display:
Cannot read file attributes of "sftp://xxxxx.ddns.ms/USB_Stick".
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)
Cannot read file attributes of "sftp://xxxxx.ddns.ms/USB_Stick".
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
There is a second SFTP-specific time-out which is currently set at 10 seconds. I've increased it to 20, let me know if the updated beta works for you:
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
- Posts: 12
- Joined: 9 Dec 2015
The latest version displays the same message after i pressed "Synchronize" button. Cannot read file attributes of "sftp://xxxxx.ddns.ms/USB_Stick".
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat) after 20 seconds. After pressing "Compare" button everything is fine, although I have noticed that in this case connection to the server is checks too. In folder picker the list of folders appears in 2-3 seconds.
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat) after 20 seconds. After pressing "Compare" button everything is fine, although I have noticed that in this case connection to the server is checks too. In folder picker the list of folders appears in 2-3 seconds.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
FFS is re-using idle sftp sessions for individual file accesses. The symptoms could be explained if your SFTP server automatically closes an idle session after say 10 seconds, while FFS is unaware of this and hangs when trying to use it. FFS however generally expects this kind of problem and is currently using a 20 seconds maximum idle time allowed for sftp session re-use.
For testing I've lowered the value to 1 second so that FFS will prefer to establish a new session rather than re-use an exising one. Let me know if this works:
[404, Invalid URL: http://www.mediafire.com/download/1qui79aqgdca9hi/FreeFileSync_7.8_beta_Windows_Setup.exe]
For testing I've lowered the value to 1 second so that FFS will prefer to establish a new session rather than re-use an exising one. Let me know if this works:
[404, Invalid URL: http://www.mediafire.com/download/1qui79aqgdca9hi/FreeFileSync_7.8_beta_Windows_Setup.exe]
- Posts: 12
- Joined: 9 Dec 2015
Latest version still gives the same error "Cannot read file attributes of "sftp://xxxxx.ddns.ms/USB_Stick".
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)"
11 seconds after starting "Sinchronization". I can give you a settings to connect to my server for testing.
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)"
11 seconds after starting "Sinchronization". I can give you a settings to connect to my server for testing.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
So the hang occurs even if you wait for more than 1 second after comparison and before starting synchronization? And then after a retry sync starts immediately?
- Posts: 12
- Joined: 9 Dec 2015
Yes, the hang occurs even if i wait for more than 1 second after comparison and before starting synchronization.
- Posts: 12
- Joined: 9 Dec 2015
Latest version displays "Cannot read file attributes of "sftp://xxxxx.ddns.ms/USB_Stick".
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)" after 11 seconds when I pressed "Synchronize" button. When if I press "Retry" it starts to copying files. I checked several times. Always after pressing the "Retry" button copying succesfully starts. If You want I can give settings to connect to my sftp and check.
Error Code LIBSSH2_ERROR_TIMEOUT: would block (libssh2_sftp_stat)" after 11 seconds when I pressed "Synchronize" button. When if I press "Retry" it starts to copying files. I checked several times. Always after pressing the "Retry" button copying succesfully starts. If You want I can give settings to connect to my sftp and check.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
> If You want I can give settings to connect to my sftp and check.
Definitely, just send them via email and I'll have a closer look directly from my end.
Definitely, just send them via email and I'll have a closer look directly from my end.
- Posts: 12
- Joined: 9 Dec 2015
I send you a message through this site.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
I've analyzed the test case and the problem is unrelated to any time outs. FFS is using a command (statvfs) that is unsupported by the SFTP server. The server reports this error but in addition corrupts the SFTP session so that the next SFTP call will hang indefinitely. This is similar to viewtopic.php?t=1281 where an unsupported "fsetstat" leads to an unexpected session termination. Again I've analyzed the SFTP traffic and it looks like the server is to blame.
Since "statvfs" is not very important for FFS (used only to issue a warning about not enough disk space) and since there is no generally working problem resolution (just discarding the session is not enough in case file or directory traversal handles are open), I've disabled "statvfs" for SFTP.
The changes have been implemented for the next release:
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
Since "statvfs" is not very important for FFS (used only to issue a warning about not enough disk space) and since there is no generally working problem resolution (just discarding the session is not enough in case file or directory traversal handles are open), I've disabled "statvfs" for SFTP.
The changes have been implemented for the next release:
[404, Invalid URL: http://www.mediafire.com/download/quwllbgiia5ix70/FreeFileSync_7.8_beta_Windows_Setup.exe]
- Posts: 12
- Joined: 9 Dec 2015
Latest version reported that it need libraries msvcp140d.dll and vcruntime140d.dll. When I copy them into FFS directory, program crashes with application error 0xc000007b.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
I've updated the download link, this should work now.Latest version reported that it need libraries msvcp140d.dll and vcruntime140d.dll. When I copy them into FFS directory, program crashes with application error 0xc000007b.drohen
- Posts: 12
- Joined: 9 Dec 2015
Latest version don't work at all. In SFTP folder picker it displays after few seconds: "Failed to connect to SFTP server "xxxxx.ddns.ms".
Error Code 10060: Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера. (WSAConnectByName)"
If i press "Compare" button, program thinks 20 seconds and display: "Cannot find the following folders:
sftp://xxxxx.ddns.ms/pub
If you ignore this error the folders are considered empty. Missing folders are created automatically when needed.
___________________________________________
Time out while searching for folder "sftp://kukazoo.ddns.ms/pub"."
Folder "pub " exists on server. WinSCP continues work correctly.
Error Code 10060: Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера. (WSAConnectByName)"
If i press "Compare" button, program thinks 20 seconds and display: "Cannot find the following folders:
sftp://xxxxx.ddns.ms/pub
If you ignore this error the folders are considered empty. Missing folders are created automatically when needed.
___________________________________________
Time out while searching for folder "sftp://kukazoo.ddns.ms/pub"."
Folder "pub " exists on server. WinSCP continues work correctly.
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
I'm not able to access the server via FFS or other SFTP apps, so this looks like a server issue.Latest version don't work at all. In SFTP folder picker it displays after few seconds: "Failed to connect to SFTP server "xxxxx.ddns.ms".
Error Code 10060: Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера. (WSAConnectByName)"
If i press "Compare" button, program thinks 20 seconds and display: "Cannot find the following folders:
sftp://xxxxx.ddns.ms/pub
If you ignore this error the folders are considered empty. Missing folders are created automatically when needed.
___________________________________________
Time out while searching for folder "sftp://kukazoo.ddns.ms/pub"."
Folder "pub " exists on server. WinSCP continues work correctly.drohen
- Posts: 12
- Joined: 9 Dec 2015
I'm sorry. I tried on a different SFTP server. Everything works fine. Really a problem with SFTP, which I gave. The problem of the Internet provider. The most interesting thing that I tried to connect to it through WinSCP and everything worked fine. Therefore the latest beta version FFS works fine. Thanks! Will be these changes in the next releases of FFS?
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
Yes the changes from the latest download link will be in the next release.