Timeout waiting for WinSCP to respond

Advertisement

GRR3
Joined:
Posts:
10

Timeout waiting for WinSCP to respond

I get error "Timeout waiting for WinSCP to respond" on scripts for one vendor. It occurs intermittently, several times a week (~5 of ~70 runs fail).
I have similar scripts to other vendors that do not get this error, so I think this could be a connection issue- but I'm open to the possibility that I have a configuration issue and hoped you might see something in the logs to indicate this.

I have reviewed documentation about this error, but had a question about:
"Alternatively, you can use (undocumented) property Session.XmlLogPath to change the log file location."

In my scripts, I set up locations for session and debug logs that I know the account running the script has access to. Are these logs different than the log mentioned above?
If so, would I set this (in Powershell) as: $session.XmlLogPath = "\\location_of_log\"

Thank you.
  • 2017-Sep-04_04-30-02_CH_debug_log.txt (48.29 KB, Private file)
Description: debug log
  • 2017-Sep-04_04-30-02_CH_session_log.txt (9.3 KB, Private file)
Description: session log

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,897
Location:
Prague, Czechia

Re: Timeout waiting for WinSCP to respond

I do not see any "Timeout waiting for WinSCP to respond" error in the log file. Is this really a log file of the failed session? Can you post a callstack of the exception?

Reply with quote

Guest

Re: Timeout waiting for WinSCP to respond

I have the script set up to create separate log files. I have attached the log file for the script itself, which shows the exception caught.

I also create separate session and debug logs for each connection the script makes and in the previous post attached the logs for the connection that failed.

I'm not sure what the callstack is, or I would post it.
  • script_to_forum.txt (13.39 KB, Private file)
Description: script
  • 2017-Sep-04_04-30-02_script_log.txt (2.34 KB, Private file)
Description: script log

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
30,897
Location:
Prague, Czechia

Re: Timeout waiting for WinSCP to respond

OK, I didn't notice, that you are not using the latest version of WinSCP.

Please upgrade and post new session and debug log files.

Reply with quote

GRR3
Joined:
Posts:
10

Re: Timeout waiting for WinSCP to respond

martin wrote:

OK, I didn't notice, that you are not using the latest version of WinSCP.

Please upgrade and post new session and debug log files.

I have updated to the latest version. Again, this error occurs intermittently, so this is the first occurrence after updating.

Thank you.
  • 2017-Sep-14_11-30-01_WinSCP_session_log.txt (12.39 KB, Private file)
Description: session log
  • 2017-Sep-14_11-30-01_WinSCP_debug_log.txt (51.13 KB, Private file)
Description: debug log
  • 2017-Sep-14_11-30-01_my_script_log.txt (486 Bytes, Private file)
Description: script log

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,897
Location:
Prague, Czechia

Re: Timeout waiting for WinSCP to respond

WinSCP stops on waiting for the server to open file fil2041144889.mbx.PAH60384.75261.

I do not know if your server is ever going to respond, obviously.

Anyway, you have set SessionOptions.Timeout to 120 seconds.

But as Session.Timeout is set to its default 60 seconds, the .NET assembly will kill WinSCP after those 60 seconds, so WinSCP will never have a chance to wait 120 seconds.

If you really want WinSCP to wait 120 seconds (hoping the server ever responds), you have to set the Session.Timeout at least to 120 seconds too.

Reply with quote

GRR3
Joined:
Posts:
10

Re: Timeout waiting for WinSCP to respond

Thank you, I set session.timeout to 120 seconds.

I do not understand the difference between the sessionoptions.timeout and session.timeout.

Would it make sense for me to set sessionoptions.timeout to 120 seconds and session.timeout to a larger value?
Would I then get an error that says "Timeout waiting for the remote server" instead of "Timeout waiting for WinSCP to respond".
Or how would you expect these to be set?


martin wrote:

WinSCP stops on waiting for the server to open file fil2041144889.mbx.PAH60384.75261.

I do not know if your server is ever going to respond, obviously.

Anyway, you have set SessionOptions.Timeout to 120 seconds.

But as Session.Timeout is set to its default 60 seconds, the .NET assembly will kill WinSCP after those 60 seconds, so WinSCP will never have a chance to wait 120 seconds.

If you really want WinSCP to wait 120 seconds (hoping the server ever responds), you have to set the Session.Timeout at least to 120 seconds too.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
30,897
Location:
Prague, Czechia

Re: Timeout waiting for WinSCP to respond

GRR3 wrote:

Would it make sense for me to set sessionoptions.timeout to 120 seconds and session.timeout to a larger value?
Would I then get an error that says "Timeout waiting for the remote server" instead of "Timeout waiting for WinSCP to respond".
Yes. That's about right.

Reply with quote

xizwyck
Joined:
Posts:
1

Error still exists in latest version

I would create a new post but the entire forum is in read only mode??

I'm using the latest version, just downloaded today and I still get an error:

System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file D:\Temp\wscp0D34.01E329F8.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself. at WinSCP.Session.CheckForTimeout(String additional) at WinSCP.Session.Open(SessionOptions sessionOptions) at...

This is on a remote server and the application is running under an ID that is not a true admin... that being said, I have the session log path set to a particular folder that would work. I attempted to set the debug log path but then it said that the valid path was not found (?).

Also, I set the session log path to a specific folder but it appears that is being ignored. And yes, I set the path before I called Open().

Any ideas or am I wasting my time on this product?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,897
Location:
Prague, Czechia

Re: Error still exists in latest version

xizwyck wrote:

System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file D:\Temp\wscp0D34.01E329F8.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself. at WinSCP.Session.CheckForTimeout(String additional) at WinSCP.Session.Open(SessionOptions sessionOptions) at...
Did you read a documentation for that error message?
https://winscp.net/eng/docs/message_library_timeout_waiting_to_respond

Reply with quote

Advertisement

You can post new topics in this forum