login about faq

When I set ConnectTimeoutMs to a number larger than 21, it times out after 21 seconds with the message: "Failed to establish initial TCP/IP connection"

Details: My VB6 code sends a file to an SFTP server works great over a LAN, but when I switch to dialup to simulate an old field installation, it would fail every time with "Failed to establish initial TCP/IP connection" after 21 seconds, even if the timeout was set higher. Enabling sftp.VerboseLogging indicated two interesting things:

  1. "Connect_SFtp(21000ms)" which proves the 21 second timeout.

  2. The timeout occurred because it was trying to connect to a local IP 192.168.x.x instead of the public IP of our SFTP server, which is accessed via the domain name. Once I flushed the DNS cache via "ipconfig /flushdns" on Windows 10 it starting working over dialup. I'm not sure why I needed to manually flush the DNS cache either, but that's a separate problem.

asked Oct 09 at 17:38

randydellinger's gravatar image


edited Oct 09 at 18:08

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 09 at 17:38

Seen: 379 times

Last updated: Oct 09 at 18:08

powered by OSQA