Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Net SFTP Foreign backend ssh2 Put not working for large files LIBSSH2_ERROR_SOCKET_NON(-1) transport read

by neoryan (Initiate)
on Jul 10, 2012 at 16:59 UTC ( #980902=perlquestion: print w/ replies, xml ) Need Help??
neoryan has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I have a script which does SFTP from Windows box using Net SFTP Foreign backend ssh2, but i am getting error "Bad remote message received". Getting following error when full debugging mode is ON - Error: read failed: LIBSSH2_ERROR_SOCKET_NON(-1): transport read. I also did turn on full debugging mode and below is the output from full debuging mode. Script works fine for smaller files (I tried < 1 MB), but when i tried with file approx 750 MBs, it is giving me error after 15-45 mins of script run time. Version info is - OS - Windows Server 2003, Perl v5.10.0, Net-SFTP-Foreign - 1.73, Net-SFTP-Foreign-Backend_SSH2 - 0.05. Please let me know if any more information is needed. Thanks in advance.

#2388 1341858308.00000 _get_msg: waiting for message... [32] #2388 1341858308.00000 _do_io: 1070 bytes written to SSH channel #2388 1341858311.00000 _sysreadn: 4 bytes read from SSH channel #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _set_status: _set_status code: 7, str: Connecti +on lost #2388 1341860452.00000 _set_error: _set_err code: 37, str: read failed +: LIBSSH2_ ERROR_SOCKET_NONE (-1): transport read #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _get_msg: waiting for message... [32] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _queue_msg: queueing msg len: 30, code:4, id:67 +1426 ... [ 33] 00 00 00 1e 04 00 0a 3e c2 00 00 00 15 2d 31 30 35 32 33 34 34 39 31 3 +4 2d 32 34 33 31 30 30 34 | .......>.....-1052344914-2431004 34 33 | 43 #2388 1341860452.00000 _get_msg: waiting for message... [33] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _close: closing file handle, return: -, rid: 2d 31 30 35 32 33 34 34 39 31 34 2d 32 34 33 31 30 30 34 34 33 | -1052344914-243100443 #2388 1341860452.00000 DESTROY: Net::SFTP::Foreign::FileHandle=GLOB(0x +22c1524)-> DESTROY called (sftp: Net::SFTP::Foreign=HASH(0x3acdc)) #2388 1341860452.00000 _queue_msg: queueing msg len: 30, code:4, id:67 +1427 ... [ 34] 00 00 00 1e 04 00 0a 3e c3 00 00 00 15 2d 31 30 35 32 33 34 34 39 31 3 +4 2d 32 34 33 31 30 30 34 | .......>.....-1052344914-2431004 34 33 | 43 #2388 1341860452.00000 _get_msg: waiting for message... [34] #2388 1341860452.00000 _conn_lost: _conn_lost #2388 1341860452.00000 _close: closing file handle, return: -, rid: 2d 31 30 35 32 33 34 34 39 31 34 2d 32 34 33 31 30 30 34 34 33 | -1052344914-243100443 Error: read failed: LIBSSH2_ERROR_SOCKET_NON +E (-1): tr ansport read. #2388 1341860453.00000 DESTROY: Net::SFTP::Foreign=HASH(0x3acdc)->DEST +ROY called (current pid: 2388, disconnect_by_pid: ) #2388 1341860453.00000 disconnect: Net::SFTP::Foreign=HASH(0x3acdc)->d +isconnect called (ssh pid: ) #2388 1341860453.00000 _conn_lost: _conn_lost

Comment on Net SFTP Foreign backend ssh2 Put not working for large files LIBSSH2_ERROR_SOCKET_NON(-1) transport read
Download Code
Re: Net SFTP Foreign backend ssh2 Put not working for large files LIBSSH2_ERROR_SOCKET_NON(-1) transport read
by salva (Abbot) on Jul 10, 2012 at 17:15 UTC
    Which versions of Net::SSH2 and libssh2 have you installed?

    You should try installing the latest versions of Net::SFTP::Foreign::Backend::Net_SSH2, Net::SSH2 and specially libssh2 as several bugs affecting long transfers were solved on the last release.

      I am not sure how to update libssh2 on windows server, can someone please guide me?
        Latest versions of Net::SSH2 contain a file describing how to compile everything from scratch on Windows... though, even following that instruction it is not an easy task, YMMV.

        Precompiled packages are available from http://www.sisyphusion.tk/ppm/ (by courtesy of syphilis).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://980902]
Approved by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-05 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls