winscp does not answer - log: Looking for network events (indefinitely) - winscp.exe is not killed

Advertisement

PascalF
Joined:
Posts:
4
Location:
France

winscp does not answer - log: Looking for network events (indefinitely) - winscp.exe is not killed

Hello

my program launches winscp.com as an external process, but it does not answer
then, my program kills winscp.com but winscp.exe is not killed

I wish that
- winscp returns
- (if not) when winscp.com is killed, then winscp.exe is also killed

I used following scripting commands:
- option batch on
- option confirm off
- option reconnecttime=1
I used following switches for the open command:
-rawsettings SendBuf=0 SshSimple=1 (for turning off 'Optimize connection buffer size')
-timeout=7
Must I change commands/switches ?

Thank you in advance!

=============================================================================
below are winscp log messages:
**Host is not communicating for 7 seconds.
Wait for another 7 seconds?** ()
Script: Host is not communicating for more than 7 seconds.
Still waiting...
Note: If the problem repeats, try turning off 'Optimize connection buffer size'.

[then, following lines repeat indefinitely:]
Pooling for data in case they finally arrives
Looking for network events
Timeout waiting for network events

Pooling for data in case they finally arrives
Looking for network events
Timeout waiting for network events
....
  • winscp-log-timeoutDoesNotWork-forum.log (25.9 KB, Private file)

Reply with quote

Advertisement

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

Re: winscp does not answer - log: Looking for network events (indefinitely) - winscp.exe is not killed

It's not clear to me, if the "does not answer" problem happens always, or sometime only?

The winscp.exe should get killed with the winscp.com. If you run the winscp.com manually from a command-line and kill it with Task Manager, is the winscp.exe killed?

Reply with quote

Guest

Hi Martin, thanks for your reply, I add precisions


1°) description of anomaly

my program
- launches winscp.com as an external process to several sftp servers.
- if winscp.com does not exit after timeout, then my program kills winscp.com

two configurations (to server-1 and to server-2 )are bad: remote folder does not exist
- program connects to server-1 on non-existing-folder1, then after timeout, my program kills winscp.com, and winscp.exe is killed => OK
- program connects to server-2 on non-existing-folder2, then after timeout, my program kills winscp.com, but winscp.exe is NOT killed => anomaly (I think)


notes:
- program uses System.Diagnostics.Process .NET object and the Kill() method
- program creates winscp.com process with following scripting commands: option batch on, option confirm off, option reconnecttime 1
- program uses following switches for the open command: -timeout=7 -rawsettings SendBuf=0 SshSimple=1 (for turning off 'Optimize connection buffer size')


2°) behaviour of winscp as a command line
2.1°) note: I am prompted
I use option batch on and option confirm off, but I am prompted

winscp> open user@server-2 ...
Active session: [1] ...
winscp> cd /NonExistingDir
Host is not communicating for more than 15 seconds.
Still waiting...
Note: If the problem repeats, try turning off 'Optimize connection buffer size'.

Warning: Aborting this operation will close connection!
(A)bort (53 s):


2.2 °) winscp.com as a command line + kill winscp.com from task manager

- I run winscp.com as a command line
- I open connection to whichever server, I do not change dir
- then I kill winscp.com with Task-Manager (EndProcess, not EndProcessTree)
- it does not kills winscp.exe

Reply with quote

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

Anonymous wrote:

2.2 °) winscp.com as a command line + kill winscp.com from task manager

- I run winscp.com as a command line
- I open connection to whichever server, I do not change dir
- then I kill winscp.com with Task-Manager (EndProcess, not EndProcessTree)
- it does not kills winscp.exe
I cannot reproduce this.
On Windows 2008 R2 (is this what you are using, right?), I start winscp.com from the cmd.exe console. I do not even connect anywhere nor type any commands, for simplicity. In Task manager I find the winscp.com process and select "End process". Both winscp.com and winscp.exe are killed.

Reply with quote

PascalF
Joined:
Posts:
4
Location:
France

Hello Martin, thanks for your reply, I add precision


2.2 °) winscp.com as a command line + kill winscp.com from task manager
- I connect to the platform (W2008R2) with User1 identity
- I run winscp.com as a command line with User2 identity
- I open connection to whichever server, I do not change dir
- then I kill winscp.com with Task-Manager (EndProcess, not EndProcessTree)
- it does not kills winscp.exe

Reply with quote

Advertisement

PascalF
Joined:
Posts:
4
Location:
France

Using just one identity (I log in to RDP with id1 and run winscp.com with id1)
=> if winscp.com is killed, then winscp.exe is killed also

Using two identities (I log in to RDP with id1 and run winscp.com with id2),
=> if winscp.com is killed, then winscp.exe is NOT killed

my tool runs as a scheduled task. Behaviour is like when using 2 identities
=> if winscp.com is killed, then winscp.exe is NOT killed

Reply with quote

martin
Site Admin
martin avatar

OK, so that's it. Thanks for the investigation.

Though note that you generally do not need to use winscp.com in Task Scheduler, as you typically cannot see the console anyway. Use the winscp.exe directly.

Reply with quote

PascalF
Joined:
Posts:
4
Location:
France

Hello Martin, thanks for your reply

my program (running as scheduled task with an identity)
- launches winscp.com as an external process to several sftp servers.
- if winscp.com does not exit after timeout, then my program kills winscp.com

This case occurs:
- my program connects to server-2 on non-existing-folder2, then after timeout (a few minutes), my program kills winscp.com, but winscp.exe is NOT killed => anomaly (I think)


What modification would you please advice ?
- my program should use winscp.exe instead of winscp.com?
- my program should kill winscp.com and winscp.exe ?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

PascalF wrote:

- my program should use winscp.exe instead of winscp.com?
Yes, as I wrote, use the winscp.exe directly.

Reply with quote

Advertisement

You can post new topics in this forum