Sysax Product Forums / Sysax Multi Server / General Discussion / bug: error on closing connetcion?
Posted:  19 Feb 2010 22:21   Last Edited By: darinc
this is something one of our clients has complained about:

I am running across one issue with my sftp connection with your server. 

Opening a connection and uploading the test file was successfully, however for some reason I am getting an error message when I'm trying to disconnect.
I've attached a log from a sftp session that I ran in debug mode to show the error I'm getting.

We are using the vsftp client to connect and as I said there is no issue opening a connection, and I am even able to execute several commands such as 'pwd', 'ls', and the put.
But when I enter either of the following, "close", "quit", or "exit" to close the connection, I am getting a 255 return code. 

Because of this error, this will impact our monitors that we have in place that checks for errors in any of our file transfers and sends out a notification to our support staff.  So even though we were able to send you a file, the monitor will send out a false alert.

$ /usr/local/bin/vsftp -v --accepthostkeys --auth password --pw $targetpw $ta >
VSFTP version 5.5.3 (build 646) starting. (Using SSH2Core version 4.3.0.646.)
[LOCAL] : SSH2Core version 4.3.0.646
[LOCAL] : Connecting to *deleted*:22 ...
[LOCAL] : Changing state from STATE_NOT_CONNECTED to STATE_EXPECT_KEX_INIT
[LOCAL] : Using protocol SSH2
[LOCAL] : RECV : Remote Identifier = "SSH-2.0-SysaxSSH_1.0"
[LOCAL] : CAP  : Remote can re-key
[LOCAL] : CAP  : Remote sends language in password change requests
[LOCAL] : CAP  : Remote sends algorithm name in PK_OK packets
[LOCAL] : CAP  : Remote sends algorithm name in public key packets
[LOCAL] : CAP  : Remote sends algorithm name in signatures
[LOCAL] : CAP  : Remote sends error text in open failure packets
[LOCAL] : CAP  : Remote sends name in service accept packets
[LOCAL] : CAP  : Remote includes port number in x11 open packets
[LOCAL] : CAP  : Remote uses 160 bit keys for SHA1 MAC
[LOCAL] : CAP  : Remote supports new diffie-hellman group exchange messages
[LOCAL] : CAP  : Remote correctly handles unknown SFTP extensions
[LOCAL] : CAP  : Remote correctly encodes OID for gssapi
[LOCAL] : CAP  : Remote correctly uses connected addresses in forwarded-tcpip requests
[LOCAL] : CAP  : Remote can do SFTP version 4
[LOCAL] : CAP  : Remote uses SHA1 hash in RSA signatures for x.509v3
[LOCAL] : CAP  : Remote x.509v3 uses ASN.1 encoding for DSA signatures
[LOCAL] : SEND : KEXINIT
[LOCAL] : RECV : Read kexinit
[LOCAL] : Available Remote Kex Methods = diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
[LOCAL] : Selected Kex Method = diffie-hellman-group-exchange-sha1
[LOCAL] : Available Remote Host Key Algos = ssh-rsa,ssh-dss
[LOCAL] : Selected Host Key Algo = ssh-dss
[LOCAL] : Available Remote Send Ciphers = aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
[LOCAL] : Selected Send Cipher = aes256-cbc
[LOCAL] : Available Remote Recv Ciphers = aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
[LOCAL] : Selected Recv Cipher = aes256-cbc
[LOCAL] : Available Remote Send Macs = hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
[LOCAL] : Selected Send Mac = hmac-sha1
[LOCAL] : Available Remote Recv Macs = hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
[LOCAL] : Selected Recv Mac = hmac-sha1
[LOCAL] : Available Remote Compressors = zlib,none
[LOCAL] : Selected Compressor = none
[LOCAL] : Available Remote Decompressors = zlib,none
[LOCAL] : Selected Decompressor = none
[LOCAL] : Changing state from STATE_EXPECT_KEX_INIT to STATE_KEY_EXCHANGE
[LOCAL] : SEND : KEXDH_GEX_REQUEST
[LOCAL] : RECV : KEXDH_GEX_GROUP
[LOCAL] : RECV : DH Prime is 2048 bits
[LOCAL] : SEND : KEXDH_INIT
[LOCAL] : RECV : KEXDH_REPLY
[LOCAL] : SEND : NEWKEYS
[LOCAL] : Changing state from STATE_KEY_EXCHANGE to STATE_EXPECT_NEWKEYS
[LOCAL] : RECV : NEWKEYS
[LOCAL] : Changing state from STATE_EXPECT_NEWKEYS to STATE_CONNECTION
[LOCAL] : SEND: SERVICE_REQUEST[ssh-userauth]
[LOCAL] : RECV: SERVICE_ACCEPT[ssh-userauth] -- OK
[LOCAL] : SENT : USERAUTH_REQUEST [none]
[LOCAL] : RECV : USERAUTH_FAILURE, continuations [publickey,password]
[LOCAL] : SENT : USERAUTH_REQUEST [password]
[LOCAL] : RECV : AUTH_SUCCESS
[LOCAL] : RECV : Server Sftp Version: 3
[LOCAL] : SENT : fs-multiple-roots-supported request[Off]
[LOCAL] : SENT : vendor-id request
[LOCAL] : RECV : fs-multiple-roots-supported reply: 8
[LOCAL] : SEND : Stat .
[LOCAL] : SEND : RealPath, base=.
vsftp> ls
[LOCAL] : SEND : Stat /.
[LOCAL] : SEND : RealPath, base=/.
vsftp> pwd
/
vsftp>
vsftp> quit
[LOCAL] : Changing state from STATE_CONNECTION to STATE_CLOSING
[LOCAL] : RECV: Disconnect packet (reason: 2: A protocol error occurred. disconnecting
[LOCAL] : Changing state from STATE_CLOSING to STATE_CLOSED
[LOCAL] : Connected for 28 seconds, 2079 bytes sent, 2918 bytes received
Server disconnected: A protocol error occurred.
disconnecting
$ echo $?
255
Posted:  02 Mar 2010 08:36
I have passed this issue to our developers to look at. Looks like an issue with connection shutdown.


----------------------------------------------
FTP Server Solutions Simplified
 

Copyright © 2021 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0