Timeout with wodsftp - WeOnlyDo Discussion board

Timeout with wodsftp (wodSFTP / wodSFTP.NET / wodSFTPdll)

by pjeffmcd, Tuesday, October 27, 2009, 23:04 (5287 days ago)

Hello all,

Looking for some assistance with a timeout issue connecting to an HPUX server...my app (VB based) is utilizing the wodsftp ActiveX component (version 3.2.1.62) and is passing the host, user/pass, and a timeout to the HPUX server. Timeout is set to 30 seconds...30 seconds after the authentication attempt an error 1460 is received.

I'm able to authenticate via putty's sftp and winscp. Using wireshark from Windows, I captured a trace with both wodsftp and winscp:

WODSFTP
TCP ndsp > ssh [SYN] Seq=0 Win=64240 Len=0 MSS=1460
TCP ssh > ndsp [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=1460
TCP ndsp > ssh [ACK] Seq=1 Ack=1 Win=64240 Len=0
SSHv2 Server Protocol: SSH-2.0-OpenSSH_5.0p1+sftpfilecontrol-v1.2-hpn13v1
SSHv2 Client Protocol: SSH-2.0-WeOnlyDo

SSHv2 Server: Key Exchange Init
SSHv2 Client: Key Exchange Init
TCP ssh > ndsp [ACK] Seq=836 Ack=499 Win=32768 Len=0
SSHv2 Client: Diffie-Hellman Key Exchange Init
SSHv2 Server: New Keys
SSHv2 Client: New Keys
TCP ssh > ndsp [ACK] Seq=1556 Ack=659 Win=32768 Len=0
TCP [TCP segment of a reassembled PDU]
TCP [TCP segment of a reassembled PDU]
TCP [TCP segment of a reassembled PDU]
TCP [TCP segment of a reassembled PDU]
TCP [TCP segment of a reassembled PDU]
TCP ssh > ndsp [ACK] Seq=1692 Ack=863 Win=32768 Len=0
TCP ndsp > ssh [FIN, ACK] Seq=863 Ack=1692 Win=64104 Len=0
TCP ssh > ndsp [ACK] Seq=1692 Ack=864 Win=32768 Len=0

WINSCP
TCP ndnp > ssh [SYN] Seq=0 Win=64240 Len=0 MSS=1460
TCP ssh > ndnp [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=1460
TCP ndnp > ssh [ACK] Seq=1 Ack=1 Win=64240 Len=0
SSHv2 Server Protocol: SSH-2.0-OpenSSH_5.0p1+sftpfilecontrol-v1.2-hpn13v1
SSHv2 Client Protocol: SSH-2.0-WinSCP_release_4.2.3

SSHv2 Server: Key Exchange Init
SSHv2 Client: Key Exchange Init
TCP ssh > ndnp [ACK] Seq=836 Ack=639 Win=32768 Len=0
SSHv2 Client: Diffie-Hellman Key Exchange Init
SSHv2 Server: Diffie-Hellman Key Exchange Reply
SSHv2 Client: Diffie-Hellman GEX Init
SSHv2 Server: Diffie-Hellman GEX Reply
TCP ndnp > ssh [ACK] Seq=927 Ack=1964 Win=64240 Len=0
SSHv2 Client: New Keys
TCP ssh > ndnp [ACK] Seq=1964 Ack=943 Win=32768 Len=0
SSHv2 Encrypted request packet len=52
SSHv2 Encrypted response packet len=52
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=84
SSHv2 Encrypted request packet len=100
TCP ssh > ndnp [ACK] Seq=2100 Ack=1163 Win=32768 Len=0
SSHv2 Encrypted response packet len=68
SSHv2 Encrypted request packet len=296
SSHv2 Encrypted response packet len=52
SSHv2 Encrypted request packet len=296
SSHv2 Encrypted response packet len=36
SSHv2 Encrypted request packet len=68
TCP ssh > ndnp [ACK] Seq=2256 Ack=1823 Win=32768 Len=0
SSHv2 Encrypted response packet len=52
SSHv2 Encrypted request packet len=84
TCP ssh > ndnp [ACK] Seq=2308 Ack=1907 Win=32768 Len=0
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=88
SSHv2 Encrypted request packet len=52
SSHv2 Encrypted response packet len=84
SSHv2 Encrypted request packet len=52
SSHv2 Encrypted response packet len=100
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=68
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=804
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=84
SSHv2 Encrypted request packet len=68
SSHv2 Encrypted response packet len=68
TCP ndnp > ssh [ACK] Seq=2351 Ack=3604 Win=64088 Len=0

The traces appear to be mostly identical until the Client: Diffie-Hellman Key Exchange Init ....at that point there is no reply from the server in wodsftp as there is with winscp (Server: Diffie-Hellman Key Exchange Reply).

I've researched outside of wodsftp (unrelated sftp forums, hpux config, etc.) but have come up empty handed.

Any information or ideas would be greatly appreciated!

-Pete

Re: Timeout with wodsftp

by wodDamir, Tuesday, October 27, 2009, 23:07 (5287 days ago) @ pjeffmcd

Pete,

Can you please verify which version of wodSFTP you use? You can do so by checking what Version property returns.

Also, can you please show me your code where you initiate Connect method?

Regards,
Damba

Re: Timeout with wodsftp

by pjeffmcd, Tuesday, October 27, 2009, 23:19 (5287 days ago) @ wodDamir

ActiveX component lists a version of 3.2.1.62

I apologize as I cannot divulge our code, but we pass the following to your component:

licensekey
blocking = true
hostname
login
password
timeout

Finally, .Connect is called.

If at any point an FTPerror is received, a failure occurs. This is occurring with a timeout error.

Thanks!


Re: Timeout with wodsftp

by wodDamir, Tuesday, October 27, 2009, 23:53 (5287 days ago) @ pjeffmcd

Pete,

Can you please try updating to the latest version of the component?

There were many updates/fixes since then, so perhaps the issue that you are experiencing was solved in the meantime.

Also, are you perhaps using any events? Using events in Blocking mode, could cause component to *hang*, thus causing component to wait until Timeout is reached.

Regards,
Damba

Re: Timeout with wodsftp

by pjeffmcd, Wednesday, October 28, 2009, 22:16 (5286 days ago) @ wodDamir

Thanks Damba, but no luck with the updated version. We downloaded the
ActiveX control this morning and implemented. Same issue exists, 30 second timeout is met and our function fails. Any other suggestions or information I can provide?

Thanks!!

Re: Timeout with wodsftp

by woddrazen, Wednesday, October 28, 2009, 22:35 (5286 days ago) @ pjeffmcd

Pete,


Can you please try to change encryption algorithm type in wodSFTP. You can use wodSFTP Encryption Property for that.

More help for Encryption Property you can find here:
http://www.weonlydo.com/SFTP/Help/wodSFTPLib~wodSFTP~Encryption.html

Please try all encryption types. Make sure that Encryption Property is set before Connect Method in your code.

Let us know how it goes.


Drazen

Re: Timeout with wodsftp

by pjeffmcd, Wednesday, October 28, 2009, 23:59 (5286 days ago) @ woddrazen

Thanks Drazen. The Encryption property didn't help, but I did take a look at the Authentication property. Currently, we do not set Authentication to anything. I changed this to use KeyboardInteraction (.Authentication = 4) and was finally able to authenticate. From what I read in the notes, I'm assuming if the property isn't set, it will default to AuthBoth...I'm guessing both is Password then KeyboardInteraction...is that true?

If so, how long would it take to try password before failing over to KeyboardInteraction? Is there a timeout or is a message expected before failover? Not having much luck in finding the source of the issue in the SSH configuration. There are many servers using our current calls to wodsftp (i.e. not calling Authentication) that work just fine.

Thanks!!

Re: Timeout with wodsftp

by woddrazen, Thursday, October 29, 2009, 09:27 (5286 days ago) @ pjeffmcd

Pete,


Actually when authBoth is used wodSFTP will try to connect using password and private key authentication.

When authentication is set to authPassword wodSFTP will first try to use Password authentication and if that fails will try with KeyboardInteractive authentication.

KeyboardInteractive authentication will be used just after Password authentication received error from server. Can you maybe try this out with your server?


Drazen

Re: Timeout with wodsftp

by pjeffmcd, Thursday, October 29, 2009, 14:23 (5286 days ago) @ woddrazen

Thanks Drazen. If the Authentication property is not set, what does the control default to? AuthBoth?

Thanks!!

Re: Timeout with wodsftp

by woddrazen, Thursday, October 29, 2009, 15:06 (5286 days ago) @ pjeffmcd

Pete,


authPassword is default authentication type in Authentication Property.


Drazen