linuxsftpfile-transfernfsdisk

file transfer using sftp fails with error ETAdebug3: Sent message SSH2_FXP_WRITE I:12 O:0 S:32768


We are trying to transfer the file from sftp server to the remote server. The file transfer works well when we transfer small-size (2-5MB) files. But, the file transfer fails intermittently when we want to transfer files greater than 30 MB in size.

Though 80% of the times we could transfer files that are of size more than 100MB. But this happens only 20 % times, the files with sizes bigger than 5 MB getting failed with the below error, this error is when we enabled verbose mode for the sftp session, when the failure happened.

   ETAdebug3: Sent message SSH2_FXP_WRITE I:12 O:0 S:32768
    debug3: Looking up *
    Uploading AWS Security best practices.pdf to /root/sftp-test/AWS Security best practices.pdf
    debug3: Sent message SSH2_FXP_OPEN I:11 P:/root/sftp-test/AWS Security best practices.pdf
    AWS Security best practices.pdf                                                                                                                                                   0%    0     0.0KB/s   --:-- ETAdebug3: Sent message SSH2_FXP_WRITE I:12 O:0 S:32768
    AWS Security best practices.pdf                                                                                                                                                   
0%    0     0.0KB/s - stalled -

The destination sftp server is mounted using the NFS file system, also we tried to transfer it over the boot disk but still had the same scenario.

Can someone please help us why we are getting the error?


Solution

  • Below are two references.

    Tried this solution and it worked.

    Run this command and try sftp again
    sudo sysctl -w net.ipv4.tcp_sack=0
    
    To make it permanent, edit /etc/sysctl.conf and add this line
    Then run: sudo sysctl -p
    

    Also, we have rebooted the sftp server, which was not rebooted in last 1 year.

    upload stalls or very slow stalls while sending large sftp file