Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Network error: Connection timed out

Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
Derrick

Network error: Connection timed out

Hi,
I'm getting an occasional connection timeout after < 30 seconds even though I've set the timeout to 120 seconds.
Please could you let me know what I've missed.

2016-09-15 14:25:03.449 Transfer Protocol: SFTP
. 2016-09-15 14:25:03.449 Ping type: -, Ping interval: 30 sec; Timeout: 120 sec
. 2016-09-15 14:25:03.449 Proxy: none

. 2016-09-15 14:25:03.449 Looking up host "XXX.XXX.XXX.XXX"
. 2016-09-15 14:25:03.449 Connecting to XXX.XXX.XXX.XXX port 22
. 2016-09-15 14:25:24.478 Failed to connect to XXX.XXX.XXX.XXX: Network error: Connection timed out
. 2016-09-15 14:25:24.494 Knocking FTP port.
. 2016-09-15 14:25:26.522 FTP port did not open.

Code:
With mySessionOptions
.Protocol = Protocol.Sftp
.HostName = "XXX.XXX.XXX.XXX"
.UserName = "XXXXXXXX"
.Password = "XXXXXXXX"
.PortNumber = 22
.SshHostKeyFingerprint = "ssh-rsa 1024 XX:XX:XX:CC:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
.Timeout = New TimeSpan(0, 2, 0) ' 2 mins
End With