SFTP plugin: copy write error

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: sftp copy - write error

Post by *ghisler(Author) » 2019-02-11, 14:09 UTC

The progress bar is updated only irregularly to not slow down the actual transfer.
Author of Total Commander
http://www.ghisler.com

Commaster
Junior Member
Junior Member
Posts: 3
Joined: 2019-02-09, 05:40 UTC

Re: sftp copy - write error

Post by *Commaster » 2019-02-12, 03:32 UTC

Is it a progress bar of downloading from the source or of writing to the target? In case it's the latter I'd guess my microSD card can't write as fast as the WiFi and TC is having trouble cashing...

Commaster
Junior Member
Junior Member
Posts: 3
Joined: 2019-02-09, 05:40 UTC

Re: sftp copy - write error

Post by *Commaster » 2019-03-10, 07:57 UTC

I verified that my SD card can handle at least 30 MB/sec using the USB cable connection. So I really have no clue why this breaks.

Command&Compute
Junior Member
Junior Member
Posts: 5
Joined: 2019-11-09, 19:55 UTC

Re: sftp copy - write error

Post by *Command&Compute » 2019-11-09, 20:07 UTC

I'm getting a very similar error when trying to use the sftp plugin with scp enabled:
Here is the log, during which following happened:
I tried to connect to a free read only test sftp server on the internet, with scp enabled, and copy a file to my internal download folder, works.
Then I tried to copy a file from my server on the same network(OpenSSH on Windows) to the Download folder (internal storage), with scp enabeld, fails. I can not copy something onto it eiter, allthoug i did not log that.
Then I disabled scp and copied sth onto the server. This time it worked.

Code: Select all

2019-11-09 20:48:30.714 HOST:LAN:initiate connection to plugin
2019-11-09 20:48:30.742 HOST:LAN:bindService succeeded
2019-11-09 20:48:30.749 HOST:LAN:WaitUntilConnected:Background
2019-11-09 20:48:30.899 HOST:LAN:Service connected!
2019-11-09 20:48:30.903 HOST:LAN:get dir: /
2019-11-09 20:48:30.928 HOST:LAN:checkConnectionAlive: 1
2019-11-09 20:48:32.424 HOST:LAN:stop plugin
2019-11-09 20:48:32.437 HOST:SFTP:initiate connection to plugin
2019-11-09 20:48:32.446 HOST:SFTP:bindService succeeded
2019-11-09 20:48:32.455 HOST:SFTP:WaitUntilConnected:Background
2019-11-09 20:48:32.461 HOST:SFTP:Service connected!
2019-11-09 20:48:32.463 HOST:SFTP:get dir: /
2019-11-09 20:48:33.468 HOST:SFTP:checkConnectionAlive: 1
2019-11-09 20:48:33.577 HOST:SFTP:get dir: /test/
2019-11-09 20:48:36.603 SFTP:Verbinde...: 195.144.107.198
2019-11-09 20:48:36.825 SFTP:Algorithm: ECDSA, Fingerprint: 3d:f0:7e:e0:b5:cf:6f:60:94:66:79:96:d3:2e:81:a4
2019-11-09 20:48:36.853 SFTP:Einloggen...
2019-11-09 20:48:36.854 SFTP:Passwort: ********
2019-11-09 20:48:36.922 SFTP:SFTP start...
2019-11-09 20:48:37.096 SFTP:Verbindung hergestellt!
2019-11-09 20:48:37.097 SFTP:SFTP LIST /
2019-11-09 20:48:37.218 SFTP:CONNECT test
2019-11-09 20:48:40.594 SFTP:GET /readme.txt
2019-11-09 20:48:42.027 HOST:SFTP:get dir: /
2019-11-09 20:48:47.551 HOST:SFTP:get dir: /
2019-11-09 20:48:47.703 HOST:SFTP:get dir: /meinserver/
2019-11-09 20:48:47.786 SFTP:IP[0]: 192.168.178.32
2019-11-09 20:48:47.786 SFTP:IP[1]: 169.254.147.39
2019-11-09 20:48:47.787 SFTP:Verbinde...: 192.168.178.32
2019-11-09 20:48:48.089 SFTP:Algorithm: ECDSA, Fingerprint: aa:9b:95:62:04:03:fd:t6:88:cc:1d:de:75:66:09:2a
2019-11-09 20:48:48.090 SFTP:Einloggen...
2019-11-09 20:48:48.091 SFTP:PEM: /storage/emulated/0/Download/meineschlüsseldatei.pem
2019-11-09 20:48:48.303 SFTP:SFTP start...
2019-11-09 20:48:48.442 SFTP:Verbindung hergestellt!
2019-11-09 20:48:48.443 SFTP:SFTP LIST /
2019-11-09 20:48:48.476 SFTP:CONNECT meinserver
2019-11-09 20:48:49.543 HOST:SFTP:get dir: /meinserver/D:/
2019-11-09 20:48:49.545 SFTP:SFTP LIST /D:/
2019-11-09 20:48:55.922 SFTP:GET /D:/Neues Textdokument.txt
2019-11-09 20:48:56.008 SFTP:GET error: net.schmizz.sshj.xfer.scp.SCPException: Could not parse message ``
2019-11-09 20:49:01.074 HOST:SFTP:get dir: /meinserver/
2019-11-09 20:49:01.076 SFTP:SFTP LIST /
2019-11-09 20:49:01.913 HOST:SFTP:get dir: /
2019-11-09 20:49:15.810 HOST:SFTP:get dir: /
2019-11-09 20:49:21.352 HOST:SFTP:get dir: /
2019-11-09 20:49:51.144 HOST:SFTP:get dir: /
2019-11-09 20:49:56.615 HOST:SFTP:get dir: /meinserver/
2019-11-09 20:49:56.706 SFTP:IP[0]: 192.168.178.32
2019-11-09 20:49:56.707 SFTP:IP[1]: 169.254.147.39
2019-11-09 20:49:56.709 SFTP:Verbinde...: 192.168.178.32
2019-11-09 20:49:57.027 SFTP:Algorithm: ECDSA, Fingerprint: aa:9a:95:62:04:03:fd:b6:88:cc:1d:d8:75:66:09:2a
2019-11-09 20:49:57.030 SFTP:Einloggen...
2019-11-09 20:49:57.031 SFTP:PEM: /storage/emulated/0/Download/meineschlüsseldatei.pem
2019-11-09 20:49:57.350 SFTP:SFTP start...
2019-11-09 20:49:57.522 SFTP:Verbindung hergestellt!
2019-11-09 20:49:57.523 SFTP:SFTP LIST /
2019-11-09 20:49:57.560 SFTP:CONNECT meinserver
2019-11-09 20:49:58.723 HOST:SFTP:get dir: /meinserver/C:/
2019-11-09 20:49:58.726 SFTP:SFTP LIST /C:/
2019-11-09 20:50:04.703 HOST:SFTP:get dir: /meinserver/C:/
2019-11-09 20:50:04.704 SFTP:SFTP LIST /C:/
2019-11-09 20:50:04.752 SFTP:PUT /C:/log.txt
2019-11-09 20:50:04.855 HOST:SFTP:get dir: /meinserver/C:/
2019-11-09 20:50:04.857 SFTP:SFTP LIST /C:/
2019-11-09 20:50:14.846 HOST:SFTP:get dir: /meinserver/C:/
2019-11-09 20:50:14.848 SFTP:SFTP LIST /C:/
2019-11-09 20:50:16.602 SFTP:PUT /C:/log.txt
I'm using the latest Beta btw, allthough the behaviour was the same as with the "stable" version.

Without SCP though, TotalCommander Android only has roughly half the performance with sftp than other apps, which of course are plagued with adds or questionable privacy policies.
My fingerprints, keyfilenames and servernames are changed of course for this exercise.

I wrote this in Englisch for the greater good, aber ich kann das Troubleshooting auch gerne in Deutsch durchgehen.

Hoffentlich kann man da was machen

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: sftp copy - write error

Post by *ghisler(Author) » 2019-11-11, 11:46 UTC

2019-11-09 20:48:56.008 SFTP:GET error: net.schmizz.sshj.xfer.scp.SCPException: Could not parse message ``
Sending the SCP command seems to return a reply which isn't understandable by the used library.

What do you get when you connect manually to the SFTP server (e.g. via PuTTY) and try to send SCP command?
Author of Total Commander
http://www.ghisler.com

Command&Compute
Junior Member
Junior Member
Posts: 5
Joined: 2019-11-09, 19:55 UTC

Re: sftp copy - write error

Post by *Command&Compute » 2019-11-11, 13:25 UTC

So I connected with putty and tried to use scp:

Code: Select all

xxxxxxx xxxxxxx@xxxxxxxLAPTOP C:\Users\xxxxxxx xxxxxxx>scp
usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
Of course in this case server and client are the same machine, but i tried copying something, which worked fine:

Code: Select all

 Verzeichnis von C:\Users\xxxxxxx xxxxxxx\Videos\clips

01.06.2018  08:57    <DIR>          .
01.06.2018  08:57    <DIR>          ..
21.01.2016  19:55        15.316.450 837084.m.mp4
20.08.2017  01:23               777 Musik - Verknüpfung.lnk
              10 Datei(en),    552.330.274 Bytes
               2 Verzeichnis(se), 34.208.493.568 Bytes frei
            
xxxxxxx xxxxxxx@xxxxxxxLAPTOP C:\Users\xxxxxxx xxxxxxx\Videos\clips>scp .\837084.m.mp4 C:\
 1 Datei(en) kopiert.
There is a putty for Android, is that worth a shot for troubleshooting purposes?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: sftp copy - write error

Post by *ghisler(Author) » 2019-11-12, 20:46 UTC

That looks normal - I really cannot say what's wrong with your server then. I would probably need a test account, or the exact server version you use, so I can try it with the same server software...
Author of Total Commander
http://www.ghisler.com

Command&Compute
Junior Member
Junior Member
Posts: 5
Joined: 2019-11-09, 19:55 UTC

Re: sftp copy - write error

Post by *Command&Compute » 2019-11-13, 01:00 UTC

Going forward I'll try to log the server side, I'm confident I finally found out how.
I encounter that bug both under Samsung Android 9 and Sony android 6.

Considering my server software:
For a couple of versions now Windows had an additional optional feature to install both an openssh-server as well as client. It behaves mostly like open-ssh on Linux, just missing some of the advanced features. I'm currently using Win 10 1903, and did not make any major changes to the standard config apart from changing it to key file authentication only.
If you just Google "win 10 openssh" there will be plenty of tutorials on which icons to click, I don't know it by heart and am on mobile right now. The setup including firewall is done in seconds, and as long as one doesn't expose it to the Internet or uses a secure password one can test it without key files.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: copy write error

Post by *ghisler(Author) » 2019-11-13, 17:48 UTC

Nice, I didn't know about that feature. I will try it on Windows 10 1903.
Author of Total Commander
http://www.ghisler.com

Command&Compute
Junior Member
Junior Member
Posts: 5
Joined: 2019-11-09, 19:55 UTC

Re: SFTP plugin: copy write error

Post by *Command&Compute » 2019-11-24, 19:07 UTC

I tried logging the server side a few times now, I just can get it.
May I ask politely if you tried it yourself in the meantime?
Or can someone else confirm my problem.
Trying it should only take 5min.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: copy write error

Post by *ghisler(Author) » 2019-11-25, 11:04 UTC

No, unfortunately not, I'm currently very busy with the beta test of TC 9.50. Trying to find out what's wrong in the debugger usually takes a few hours, not 5 minutes. :(
Author of Total Commander
http://www.ghisler.com

Command&Compute
Junior Member
Junior Member
Posts: 5
Joined: 2019-11-09, 19:55 UTC

Re: SFTP plugin: copy write error

Post by *Command&Compute » 2019-11-25, 12:06 UTC

Oh I'm sorry, maybe it came across wrong. Actually debugging & fixing it would of course take longer.
I just meant to ask if you, or someone else for that matter, tried it, so that we can be sure that it's not just me systematically missconfiguring my servers.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38408
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: copy write error

Post by *ghisler(Author) » 2019-11-25, 17:56 UTC

I have to figure out first how to install and configure the server...
Author of Total Commander
http://www.ghisler.com

Post Reply