Topic "Write failed: Broken pipe error while trasferring file to SSh server via Scp command line."

Author Message
angs

Guest


I'm not sure if I can ask Scp command related questions here but wanted to give a try.

I establish connection to a SSH server via SSH reverse proxy . I have timeout set in reverse proxy as 30 seconds.When I upload a large file(1GB) via psftp command ,its ok without any issues.

Here are the commands used in psftp tool:
-----------------------------------------
psftp -pw password username@hostname:/ -P proxyport

put 112444636.edi

However when I tried to upload the same file via scp commandline I get the below error.Here I'm using Linux box as the client.

scp -P proxyport 112444636.edi username@host:/

Welcome to SFTP Server

password

Enter password for richsftp

Password:

112444636.edi 12% 10MB 546.0KB/s - stalled -Write failed: Broken pipe

112444636.edi 12% 10MB 491.4KB/s - stalled -lost connection

Logs from Proxy side:
---------------------
SSH Reverse Proxy [2, dest => src] -- Ignoring Exception [java.net.SocketTimeoutException: Read timed out]

Logs from server side:
--------------------------
09 10:24:41,771 [2984e113] FINE: @@Buffer add socketDataIn 1263716329, allocated 1, free 1 [com.maverick.nio.SocketConnection]
2016-12-09 10:24:41,771 [2984e113] FINE: @@processSelectionKey: handler is com.maverick.nio.SocketConnection, key is readable, is not writable [com.maverick.nio.Daemon]
2016-12-09 10:24:41,771 [2984e113] FINEST: @@Processing socket READ event [com.maverick.nio.SocketConnection]
2016-12-09 10:24:41,771 [2984e113] FINE: @@Buffer get socketDataIn 1263716329, allocated 1, free 0 [com.maverick.nio.SocketConnection]
2016-12-09 10:24:41,771 [2984e113] FINEST: @@Read -1 bytes from socket [com.maverick.nio.SocketConnection]
2016-12-09 10:24:41,771 [2984e113] FINEST: @@Received EOF from remote host [com.maverick.nio.SocketConnection]
2016-12-09 10:24:41,771 [2984e113] FINEST: @@Closing socket [com.maverick.nio.SocketConnection]

And I see that when transfer the file via psftp ,connection remain open until upload is complete(Its taking a while to complete the file transfer).But in the case of Scp, connection is lost right after 30 secs(timeout specified in proxy setting) while still actively transferring the file.

I turn on sshd logs on server side and see the following log statements frequently when I use psftp but not using Scp commandline.Any idea.Do you think does it caused socket timeout on proxy side which eventually closed the connection in server side.Please .Thanks for your time.

2016-12-09 10:51:00,017 [4170e6e8] FINE: @@Processing SSH_FXP_WRITE [com.maverick.sshd.Subsystem]
2016-12-09 10:51:00,017 [4170e6e8] FINE: @@Sending SSH_FXP_STATUS: : The write completed successfully reason=0 [com.maverick.sshd.Subsystem]

Thanks,
Ang
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26108
Location: Prague, Czechia
No, you cannot ask here questions about scp.

Consider asking on https://superuser.com/
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License