Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Advertisement

boris@m3tech
Guest

Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

One of my SFTP host (I have about 20 others and they are working all fine) stopped working after 2 years of success. I'm getting error
Exception: System.TimeoutException: Timeout waiting for WinSCP to respond
and cannot figure out why. I'm calling a WinSCPnet (version 5.21) library from Windows service written on C#. The host is working fine from the WinSCP.exe.
  • WinSCP.log (123.19 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,254
Location:
Prague, Czechia

Re: Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Please post session log file (Session.SessionLogPath) as well as WinSCP.exe log. Are you running WinSCP.exe on the same machine?

Reply with quote

martin
Site Admin
martin avatar

Re: Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

You have posted a debug log file (Session.DebugLogPath. I've asked for a session log file (Session.SessionLogPath).

Reply with quote

boris@m3tech
Guest

Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

I posted 2 files last time. WinSCP.log and Session.log. Here is Session.log again. Thanks, Boris
  • Session.log (6.34 KB, Private file)
Description: This is Session log file. The file created after I added Session.SessionLogPath

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Ok, I assumed (without checking) that the other log is the winscp.exe log I've asked for (whatever you actually mean by "winscp.exe" – the GUI?). So please post that.

Reply with quote

boris@m3tech
Guest

Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Here is the log from WinSCP.exe (GUI). I hope you have all the information now.
Thanks, Boris
  • WinSCP.exe.log (7.73 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Your service connects to a different IP than the GUI. Is that expected? Can you connect to the IP using plain C# code from your service?

Reply with quote

Advertisement

boris@m3tech
Guest

Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Thanks for the help. This is really interesting. I have never used direct IP for this client (I'm trying to not to use direct IP at all, only if client requires it and insist) DNS name for the host only and did not pay attention to IP addresses. Is it really possible that 1 DNS name could point to 2 different physical IP at the same time, and both IPs are working and belong to one 1 single service? I checked them both using direct IP, and both are the same SFTP server, I can use either one. What was happening is that our service opened 2 connections to the same client within short period of time (not one right after another, but short enough around 40-50 seconds) and if these 2 connections were using different IP addresses that error occurred because FTP server did not allow to open another session for the same user within this short time but did not reject connection request. It was simply waiting and then timeout error occurred. It happened only if second session had different IP. If IP for the 2 sessions are the same everything works as expected. Once I used direct IP instead of DNS host name, I stopped getting errors, no matter which of those 2 IPs I'm using.

Reply with quote

martin
Site Admin
martin avatar

Re: Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

Maybe your local machine is connected to two networks? Each having different DNS?

Reply with quote

boris@m3tech
Guest

Exception: System.TimeoutException: Timeout waiting for WinSCP to respond

No, that is definitely not the case. We just have one gateway, and all our machines have one the same public IP address.

Reply with quote

Advertisement

You can post new topics in this forum