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: Works fine in Visual Studio, won't work when deployed

This issue is being tracked already:
https://winscp.net/tracker/996

I read all the new and old reports over and over again. I seems the problem is occurring on Windows 2008 (R2 SP1) only (though for some reports where I know Windows version number 6.1.7601, it can also be Windows 7 SP1).

That may explain why I was not able to reproduce the problem on my Windows 8 test machine, where I have a task scheduled every minute for over 4 months without a single problem. I have tried now to intensify the test by running multiple sessions in parallel as @iverchenko suggested.

Can others test suggestion by @agriffin (post here) to set process to run in 2003 compatibility mode?
martin

Re: ProcMon Fun

carcass wrote:

I'm having a similar problem using the assembly from a Windows Service (getting the timeout creating log file message) and took your advice and grabbed process monitor. I ran a detailed trace and did not see anything that actually looked like an attempt to write to the named log file (I had all operations allowed in the filter).

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

ProcMon Fun

Hi Martin,

I'm having a similar problem using the assembly from a Windows Service (getting the timeout creating log file message) and took your advice and grabbed process monitor. I ran a detailed trace and did not see anything that actually looked like an attempt to write to the named log file (I had all operations allowed in the filter).

As an experiment, I logged in to the server using the same account that the service is running under. I then waited until my service was spawned the calls to winscp.com and subsequently winscp.exe. Winscp.exe has a successful Process Create and Process Start, and then hangs until, obstensibly, winscp.com gives up about a minute later. While winscp.exe is starting up, and making sure the winscp.com process is still active, I then interactively launched winscp.exe using the same command line. I get a popup error message box saying "Cannot initialize external console". Again, I'm on the same account that the service is running on. I can send you the procmon logs, if you would like.

Here's what the command line looks like:

"[my prog dir]\winscp.exe" /console=515 /consoleinstance=_4060_544 "/xmllog=C:\Users\[service user name]\AppData\Local\Temp\wscp23A4.00E739D1.tmp" "/xmlgroups" "/nointeractiveinput" "/dotnet=515" "/ini=C:\[my prog dir]\winscp.ini" "/console" "/consoleinstance=_9124_61"

The machine I am running and having the issue on Windows Server 2008 R2

winscp.exe is at version 5.1.5.0 (file version 5.1.5.3261) and winscp.com is timestamped 5/19/2013 11:17 am

I was able to execute the the same service code, and the same versions of winscp, on my local Windows 7 machine (both in and out of the Visual Studio debugger), so I'm wondering if there is some sort of Local User Permission that needs to be set up on the W2K8 box for this to work...

Let me know any other information I can provide to help, including a detailed procmon log.
martin

Re: Works fine in Visual Studio, won't work when deployed

Please download Process Monitor from:
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
When you run it, it will ask you to enter filter (if not, use filter toolbar button).
Select "Process Name", "contains", "winscp" => Add => Ok.
Then run the deployed package.
Hopefully some records about the start show up.
The go to File > Save, select "Events displayed using current filter" and PML format (both should be default).
Email me the .pml file.
imimmortl

Re: Works fine in Visual Studio, won't work when deployed

Received more information about this issue now, I found the setting of XMLLogPath as being the issue in question below. However, no matter what path I set this to it is still timing out, even to folders that I have shared with everyone, this leads me to believe that this is not a security issue. Is it possible that this could be caused by Anti-Virus software?

imimmortl wrote:

I don't want this to anyone to think this is an additional post, I have checked everything on the site regarding having an issue with running an SSIS package on SQL Server (using MS SQL Agent in my case). I using the .NET assembly exactly as the example is designed, and am getting the following error message:
[i]Task Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\Users\{user}\AppData\Local\Temp\wscp331BC.03CE0BB8.tmp was not created in time, please make sure WinSCP has write permissions to the folder     at WinSCP.Session.CheckForTimeout(String additional)[/i]
I am currently running as an administrator of this box as well as setting the INI file so that it would write to another location than the default temp directory (keep in mind I am running the package as exactly the same user as I do in Visual Studio!). I would attach a log file but since it never makes it past the open statement there isn't one to connect for WinSCP. In desperation I also set the "Temp" folder to give access to everyone on the box, still the same message. My best guess is that this error message may just be sending me down the incorrect path. Please post if any further information is needed. Thank you for any help, I've just run out of ideas of what else could be causing this issue and resources to check for it.
imimmortl

Works fine in Visual Studio, won't work when deployed

I don't want this to anyone to think this is an additional post, I have checked everything on the site regarding having an issue with running an SSIS package on SQL Server (using MS SQL Agent in my case). I using the .NET assembly exactly as the example is designed, and am getting the following error message:
[i]Task Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\Users\{user}\AppData\Local\Temp\wscp331BC.03CE0BB8.tmp was not created in time, please make sure WinSCP has write permissions to the folder     at WinSCP.Session.CheckForTimeout(String additional)[/i]
I am currently running as an administrator of this box as well as setting the INI file so that it would write to another location than the default temp directory (keep in mind I am running the package as exactly the same user as I do in Visual Studio!). I would attach a log file but since it never makes it past the open statement there isn't one to connect for WinSCP. In desperation I also set the "Temp" folder to give access to everyone on the box, still the same message. My best guess is that this error message may just be sending me down the incorrect path. Please post if any further information is needed. Thank you for any help, I've just run out of ideas of what else could be causing this issue and resources to check for it.