Open waqasraz opened 6 years ago
Can you post debug output leading up to this (set debug: console.log
in connection config object)?
home/waqas/PycharmProjects/automation_manager/automation_manager/static/staging_app/node_modules/s…:199 DEBUG: Local ident: 'SSH-2.0-ssh2js0.0.23'
/home/waqas/app/node_modules/s…:527 DEBUG: Client: Trying 1.1.1.3 on port 22 ...
/home/waqas/app/node_modules/s…:205 DEBUG: Client: Connected
/home/waqas/app/node_modules/s…:320 DEBUG: Parser: IN_INIT
/home/waqas/app/node_modules/s…:340 DEBUG: Parser: IN_GREETING
/home/waqas/app/node_modules/s…:347 DEBUG: Parser: IN_HEADER
/home/waqas/app/node_modules/s…:158 DEBUG: Remote ident: 'SSH-2.0-Cisco-2.0'
/home/waqas/app/node_modules/s…:4585 DEBUG: Outgoing: Writing KEXINIT
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 8)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:220,padLen:6,remainLen:216
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: KEXINIT
/home/waqas/app/node_modules/s…:2073 DEBUG: Comparing KEXINITs ...
/home/waqas/app/node_modules/s…:2085 DEBUG: (local) KEX algorithms: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
/home/waqas/app/node_modules/s…:2086 DEBUG: (remote) KEX algorithms: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
/home/waqas/app/node_modules/s…:2106 DEBUG: KEX algorithm: diffie-hellman-group14-sha1
/home/waqas/app/node_modules/s…:2108 DEBUG: (local) Host key formats: ssh-rsa,ssh-dss
/home/waqas/app/node_modules/s…:2109 DEBUG: (remote) Host key formats: ssh-rsa
/home/waqas/app/node_modules/s…:2129 DEBUG: Host key format: ssh-rsa
/home/waqas/app/node_modules/s…:2131 DEBUG: (local) Client->Server ciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,arcfour256,arcfour128,cast128-cbc,arcfour
/home/waqas/app/node_modules/s…:2132 DEBUG: (remote) Client->Server ciphers: aes128-ctr,aes192-ctr,aes256-ctr
/home/waqas/app/node_modules/s…:2156 DEBUG: Client->Server Cipher: aes256-ctr
/home/waqas/app/node_modules/s…:2158 DEBUG: (local) Server->Client ciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,arcfour256,arcfour128,cast128-cbc,arcfour
/home/waqas/app/node_modules/s…:2159 DEBUG: (remote) Server->Client ciphers: aes128-ctr,aes192-ctr,aes256-ctr
/home/waqas/app/node_modules/s…:2183 DEBUG: Server->Client Cipher: aes256-ctr
/home/waqas/app/node_modules/s…:2185 DEBUG: (local) Client->Server HMAC algorithms: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
/home/waqas/app/node_modules/s…:2186 DEBUG: (remote) Client->Server HMAC algorithms: hmac-sha1
/home/waqas/app/node_modules/s…:2210 DEBUG: Client->Server HMAC algorithm: hmac-sha1
/home/waqas/app/node_modules/s…:2212 DEBUG: (local) Server->Client HMAC algorithms: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
/home/waqas/app/node_modules/s…:2213 DEBUG: (remote) Server->Client HMAC algorithms: hmac-sha1
/home/waqas/app/node_modules/s…:2237 DEBUG: Server->Client HMAC algorithm: hmac-sha1
/home/waqas/app/node_modules/s…:2250 DEBUG: (local) Client->Server compression algorithms: none
/home/waqas/app/node_modules/s…:2252 DEBUG: (remote) Client->Server compression algorithms: none
/home/waqas/app/node_modules/s…:2276 DEBUG: Client->Server compression algorithm: none
/home/waqas/app/node_modules/s…:2278 DEBUG: (local) Server->Client compression algorithms: none
/home/waqas/app/node_modules/s…:2280 DEBUG: (remote) Server->Client compression algorithms: none
/home/waqas/app/node_modules/s…:2304 DEBUG: Server->Client compression algorithm: none
/home/waqas/app/node_modules/s…:4613 DEBUG: Outgoing: Writing KEXDH_INIT
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 8)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:828,padLen:7,remainLen:824
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: KEXDH_REPLY
/home/waqas/app/node_modules/s…:2373 DEBUG: Checking host key format
/home/waqas/app/node_modules/s…:2387 DEBUG: Checking signature format
/home/waqas/app/node_modules/s…:2401 DEBUG: Verifying host fingerprint
/home/waqas/app/node_modules/s…:2409 DEBUG: Host accepted by default (no verification)
/home/waqas/app/node_modules/s…:2658 DEBUG: Verifying signature
/home/waqas/app/node_modules/s…:2679 DEBUG: Outgoing: Writing NEWKEYS
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 8)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:12,padLen:10,remainLen:8
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: NEWKEYS
/home/waqas/app/node_modules/s…:911 DEBUG: Outgoing: Writing SERVICE_REQUEST (ssh-userauth)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:28,padLen:10,remainLen:16
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: SERVICE_ACCEPT
/home/waqas/app/node_modules/s…:1428 DEBUG: Outgoing: Writing USERAUTH_REQUEST (password)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:12,padLen:10,remainLen:0
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_SUCCESS
/home/waqas/app/node_modules/s…:1100 DEBUG: Outgoing: Writing CHANNEL_OPEN (0, session)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:28,padLen:10,remainLen:16
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:543 DEBUG: Parser: IN_PACKETDATAAFTER, packet: CHANNEL_OPEN_CONFIRMATION
/home/waqas/app/node_modules/s…:1368 DEBUG: Outgoing: Writing CHANNEL_REQUEST (1, subsystem: sftp)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:12,padLen:6,remainLen:0
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:3210 DEBUG: Parser: IN_PACKETDATAAFTER, packet: CHANNEL_SUCCESS (0)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:818 DEBUG: Outgoing: Writing CHANNEL_DATA (1)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:28,padLen:9,remainLen:16
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:3160 DEBUG: Parser: IN_PACKETDATAAFTER, packet: CHANNEL_DATA (0)
/home/waqas/app/node_modules/s…:1603 DEBUG[SFTP]: Outgoing: Writing STAT
/home/waqas/app/node_modules/s…:818 DEBUG: Outgoing: Writing CHANNEL_DATA (1)
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:60,padLen:9,remainLen:48
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:3160 DEBUG: Parser: IN_PACKETDATAAFTER, packet: CHANNEL_DATA (0)
/home/waqas/app/node_modules/s…:359 DEBUG[SFTP]: Parser: Response: ATTRS
/home/waqas/app/node_modules/s…:380 DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
/home/waqas/app/node_modules/s…:789 DEBUG[SFTP]: Outgoing: Writing OPEN
/home/waqas/app/node_modules/s…:818 DEBUG: Outgoing: Writing CHANNEL_DATA (1)
/home/waqas/app/node_modules/s…:386 DEBUG: Parser: IN_PACKET
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:419 DEBUG: Parser: pktLen:28,padLen:5,remainLen:16
/home/waqas/app/node_modules/s…:443 DEBUG: Parser: IN_PACKETDATA
/home/waqas/app/node_modules/s…:4405 DEBUG: Parser: Decrypting
/home/waqas/app/node_modules/s…:468 DEBUG: Parser: HMAC size:20
/home/waqas/app/node_modules/s…:477 DEBUG: Parser: IN_PACKETDATAVERIFY
/home/waqas/app/node_modules/s…:4363 DEBUG: Parser: Verifying MAC
/home/waqas/app/node_modules/s…:480 DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
/home/waqas/app/node_modules/s…:3160 DEBUG: Parser: IN_PACKETDATAAFTER, packet: CHANNEL_DATA (0)
/home/waqas/app/node_modules/s…:359 DEBUG[SFTP]: Parser: Response: STATUS
/home/waqas/app/node_modules/s…:789 DEBUG[SFTP]: Outgoing: Writing OPEN
/home/waqas/app/node_modules/s…:818 DEBUG: Outgoing: Writing CHANNEL_DATA (1)
/home/waqas/app/node_modules/s…:207 DEBUG[SFTP]: Parser: Malformed packet
events.js:182 Uncaught Error: Malformed packet
at SFTPStream._cleanup (/home/waqas/app/node_modules/s…:208)
at readString (/home/waqas/app/node_modules/s…:583)
at SFTPStream._transform (/home/waqas/app/node_modules/s…:370)
at SFTPStream.Transform._read (_stream_transform.js:186)
at SFTPStream._read (/home/waqas/app/node_modules/s…:170)
at SFTPStream.Transform._write (_stream_transform.js:174)
at doWrite (_stream_writable.js:371)
at writeOrBuffer (_stream_writable.js:357)
at SFTPStream.Writable.write (_stream_writable.js:274)
at Channel.ondata (_stream_readable.js:628)
SFTPStream._cleanup @ /home/waqas/app/node_modules/s…:208
readString @ /home/waqas/app/node_modules/s…:583
SFTPStream._transform @ /home/waqas/app/node_modules/s…:370
Transform._read @ _stream_transform.js:186
SFTPStream._read @ /home/waqas/app/node_modules/s…:170
Transform._write @ _stream_transform.js:174
doWrite @ _stream_writable.js:371
writeOrBuffer @ _stream_writable.js:357
Writable.write @ _stream_writable.js:274
ondata @ _stream_readable.js:628
emitOne @ events.js:115
emit @ events.js:210
addChunk @ _stream_readable.js:252
readableAddChunk @ _stream_readable.js:239
Readable.push @ _stream_readable.js:197
(anonymous) @ /home/waqas/app/node_modules/s…:146
emitOne @ events.js:115
emit @ events.js:210
parsePacket @ /home/waqas/app/node_modules/s…:3163
SSH2Stream._transform @ /home/waqas/app/node_modules/s…:551
Transform._read @ _stream_transform.js:186
SSH2Stream._read @ /home/waqas/app/node_modules/s…:212
Transform._write @ _stream_transform.js:174
doWrite @ _stream_writable.js:371
writeOrBuffer @ _stream_writable.js:357
Writable.write @ _stream_writable.js:274
ondata @ _stream_readable.js:628
emitOne @ events.js:115
emit @ events.js:210
addChunk @ _stream_readable.js:252
readableAddChunk @ _stream_readable.js:239
Readable.push @ _stream_readable.js:197
onread @ net.js:589
/home/waqas/app/node_modules/s…:772 DEBUG: Outgoing: Writing CHANNEL_EOF (1)
/home/waqas/app/node_modules/s…:783 DEBUG: Outgoing: Writing CHANNEL_CLOSE (1)
Does this happen consistently at the same point or ?
Unfortunately this kind of problem is hard to debug because solving it requires access to the underlying raw packet data, so adding some logging of the actual packet (in lib/sftp.js) will be necessary so we can see what's going on.
Additionally, can you update your copy of ssh2
and/or ssh2-streams
and see if the issue still occurs?
after updating, I am getting straight
Error: Failure
Can you post an updated debug log? This different message comes directly from the server unfortunately, so not much can be done about that. If you have access to sftp server logs that show what exactly is wrong, we might see if there is something that can be done on the client side. Otherwise it's hard to tell what exactly went wrong. It could be something failed at the OS level, it could be a server resource limit issue, or something else entirely.
Does anyone have an idea why this happen? everything works fine for linux devices but when i do upload on Cisco IOS I get this error.