Topic "sFTP connection problem"

Author Message
stoned1999
[View user's profile]

Joined: 2016-12-12
Posts: 2
I'm having inconsistent connection results using sFTP against CMS.HHS.GOV. I'm failing to connect on average about 3 out of 4 times, My script completes a number of instructions then fails with "Network error: Software caused connection abort". It seems to randomly complete on other occasions. (successful log below)

Does anyone have any ideas ?

. 2016-12-12 13:12:25.397 WinSCP Version 5.9.3 (Build 7136) (OS 6.1.7601 Service Pack 1 - Windows 7 Enterprise)
. 2016-12-12 13:12:25.397 Configuration: nul
. 2016-12-12 13:12:25.397 Log level: Debug 1
. 2016-12-12 13:12:25.397 Local account: UFCW\Mark Stone
. 2016-12-12 13:12:25.397 Working directory: C:\VB.NET.2015\UFCWTaskManager\UFCWTaskManager\bin\Debug
. 2016-12-12 13:12:25.397 Process ID: 7684
. 2016-12-12 13:12:25.397 Command-line: "C:\VB.NET.2015\UFCWTaskManager\UFCWTaskManager\bin\Debug\winscp.exe" /xmllog="C:\Users\Mark Stone\AppData\Local\Temp\wscp3DFC.03C927B1.tmp" /xmlgroups /xmllogrequired /nointeractiveinput /dotnet=593 /ini=nul /log="C:\TEMP\WINSCP.LOG" /loglevel=1 /console /consoleinstance=_15868_34804751_213
. 2016-12-12 13:12:25.397 Switch: /xmllog=C:\Users\Mark Stone\AppData\Local\Temp\wscp3DFC.03C927B1.tmp
. 2016-12-12 13:12:25.397 Switch: /xmlgroups
. 2016-12-12 13:12:25.397 Switch: /xmllogrequired
. 2016-12-12 13:12:25.397 Switch: /nointeractiveinput
. 2016-12-12 13:12:25.397 Switch: /dotnet=593
. 2016-12-12 13:12:25.397 Switch: /ini=nul
. 2016-12-12 13:12:25.397 Switch: /log=C:\TEMP\WINSCP.LOG
. 2016-12-12 13:12:25.397 Switch: /loglevel=1
. 2016-12-12 13:12:25.397 Switch: /console
. 2016-12-12 13:12:25.397 Switch: /consoleinstance=_15868_34804751_213
. 2016-12-12 13:12:25.397 Time zone: Current: GMT-8, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-12-12 13:12:25.397 Login time: Monday, December 12, 2016 1:12:25 PM
. 2016-12-12 13:12:25.397 --------------------------------------------------------------------------
. 2016-12-12 13:12:25.397 Script: Retrospectively logging previous script records:
> 2016-12-12 13:12:25.397 Script: option batch on
> 2016-12-12 13:12:25.397 Script: Parameter: batch
> 2016-12-12 13:12:25.397 Script: Parameter: on
< 2016-12-12 13:12:25.398 Script: batch on
< 2016-12-12 13:12:25.398 Script: reconnecttime 120
> 2016-12-12 13:12:25.398 Script: option confirm off
> 2016-12-12 13:12:25.398 Script: Parameter: confirm
> 2016-12-12 13:12:25.398 Script: Parameter: off
< 2016-12-12 13:12:25.398 Script: confirm off
> 2016-12-12 13:12:25.398 Script: option reconnecttime 120
> 2016-12-12 13:12:25.398 Script: Parameter: reconnecttime
> 2016-12-12 13:12:25.398 Script: Parameter: 120
< 2016-12-12 13:12:25.398 Script: reconnecttime 120
> 2016-12-12 13:12:25.398 Script: open sftp://UF123CW:***@sftp.section111.cms.hhs.gov:10022 -hostkey="ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c" -timeout=15
> 2016-12-12 13:12:25.398 Script: Parameter: sftp://UF123CW:***@sftp.section111.cms.hhs.gov:10022
> 2016-12-12 13:12:25.398 Script: Switch: -hostkey=ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c
> 2016-12-12 13:12:25.398 Script: Switch: -timeout=15
. 2016-12-12 13:12:25.398 --------------------------------------------------------------------------
. 2016-12-12 13:12:25.398 Session name: UF123CW@sftp.section111.cms.hhs.gov (Ad-Hoc site)
. 2016-12-12 13:12:25.398 Host name: sftp.section111.cms.hhs.gov (Port: 10022)
. 2016-12-12 13:12:25.398 User name: UF123CW (Password: Yes, Key file: No, Passphrase: No)
. 2016-12-12 13:12:25.398 Tunnel: No
. 2016-12-12 13:12:25.398 Transfer Protocol: SFTP
. 2016-12-12 13:12:25.398 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2016-12-12 13:12:25.398 Disable Nagle: No
. 2016-12-12 13:12:25.398 Proxy: None
. 2016-12-12 13:12:25.398 Send buffer: 262144
. 2016-12-12 13:12:25.398 SSH protocol version: 2; Compression: No
. 2016-12-12 13:12:25.398 Bypass authentication: No
. 2016-12-12 13:12:25.398 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-12-12 13:12:25.398 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-12-12 13:12:25.398 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2016-12-12 13:12:25.398 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2016-12-12 13:12:25.398 Simple channel: Yes
. 2016-12-12 13:12:25.398 Return code variable: Autodetect; Lookup user groups: Auto
. 2016-12-12 13:12:25.398 Shell: default
. 2016-12-12 13:12:25.398 EOL: LF, UTF: Auto
. 2016-12-12 13:12:25.398 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2016-12-12 13:12:25.398 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-12-12 13:12:25.398 SFTP Bugs: Auto,Auto
. 2016-12-12 13:12:25.398 SFTP Server: default
. 2016-12-12 13:12:25.398 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-12-12 13:12:25.398 Cache directory changes: Yes, Permanent: Yes
. 2016-12-12 13:12:25.398 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2016-12-12 13:12:25.398 DST mode: Unix
. 2016-12-12 13:12:25.398 --------------------------------------------------------------------------
. 2016-12-12 13:12:25.398 Looking up host "sftp.section111.cms.hhs.gov" for SSH connection
. 2016-12-12 13:12:25.403 Connecting to 204.76.173.42 port 10022
. 2016-12-12 13:12:25.474 We claim version: SSH-2.0-WinSCP_release_5.9.3
. 2016-12-12 13:12:25.474 Waiting for the server to continue with the initialization
. 2016-12-12 13:12:25.474 Detected network event
. 2016-12-12 13:12:25.562 Detected network event
. 2016-12-12 13:12:25.563 Network error: Software caused connection abort

















. 2016-12-12 13:23:23.691 --------------------------------------------------------------------------
. 2016-12-12 13:23:23.691 WinSCP Version 5.9.3 (Build 7136) (OS 6.1.7601 Service Pack 1 - Windows 7 Enterprise)
. 2016-12-12 13:23:23.691 Configuration: nul
. 2016-12-12 13:23:23.692 Log level: Debug 1
. 2016-12-12 13:23:23.692 Local account: UFCW\Mark Stone
. 2016-12-12 13:23:23.692 Working directory: C:\VB.NET.2015\UFCWTaskManager\UFCWTaskManager\bin\Debug
. 2016-12-12 13:23:23.692 Process ID: 10536
. 2016-12-12 13:23:23.692 Command-line: "C:\VB.NET.2015\UFCWTaskManager\UFCWTaskManager\bin\Debug\winscp.exe" /xmllog="C:\Users\Mark Stone\AppData\Local\Temp\wscp2E54.03FA6D57.tmp" /xmlgroups /xmllogrequired /nointeractiveinput /dotnet=593 /ini=nul /log="C:\TEMP\WINSCP.LOG" /loglevel=1 /console /consoleinstance=_11860_46291090_694
. 2016-12-12 13:23:23.692 Switch: /xmllog=C:\Users\Mark Stone\AppData\Local\Temp\wscp2E54.03FA6D57.tmp
. 2016-12-12 13:23:23.692 Switch: /xmlgroups
. 2016-12-12 13:23:23.692 Switch: /xmllogrequired
. 2016-12-12 13:23:23.692 Switch: /nointeractiveinput
. 2016-12-12 13:23:23.692 Switch: /dotnet=593
. 2016-12-12 13:23:23.692 Switch: /ini=nul
. 2016-12-12 13:23:23.692 Switch: /log=C:\TEMP\WINSCP.LOG
. 2016-12-12 13:23:23.692 Switch: /loglevel=1
. 2016-12-12 13:23:23.692 Switch: /console
. 2016-12-12 13:23:23.692 Switch: /consoleinstance=_11860_46291090_694
. 2016-12-12 13:23:23.692 Time zone: Current: GMT-8, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-12-12 13:23:23.692 Login time: Monday, December 12, 2016 1:23:23 PM
. 2016-12-12 13:23:23.692 --------------------------------------------------------------------------
. 2016-12-12 13:23:23.692 Script: Retrospectively logging previous script records:
> 2016-12-12 13:23:23.692 Script: option batch on
> 2016-12-12 13:23:23.692 Script: Parameter: batch
> 2016-12-12 13:23:23.692 Script: Parameter: on
< 2016-12-12 13:23:23.692 Script: batch on
< 2016-12-12 13:23:23.692 Script: reconnecttime 120
> 2016-12-12 13:23:23.692 Script: option confirm off
> 2016-12-12 13:23:23.692 Script: Parameter: confirm
> 2016-12-12 13:23:23.692 Script: Parameter: off
< 2016-12-12 13:23:23.692 Script: confirm off
> 2016-12-12 13:23:23.692 Script: option reconnecttime 120
> 2016-12-12 13:23:23.692 Script: Parameter: reconnecttime
> 2016-12-12 13:23:23.692 Script: Parameter: 120
< 2016-12-12 13:23:23.692 Script: reconnecttime 120
> 2016-12-12 13:23:23.692 Script: open sftp://UF123CW:***@sftp.section111.cms.hhs.gov:10022 -hostkey="ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c" -timeout=15
> 2016-12-12 13:23:23.692 Script: Parameter: sftp://UF123CW:***@sftp.section111.cms.hhs.gov:10022
> 2016-12-12 13:23:23.692 Script: Switch: -hostkey=ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c
> 2016-12-12 13:23:23.692 Script: Switch: -timeout=15
. 2016-12-12 13:23:23.692 --------------------------------------------------------------------------
. 2016-12-12 13:23:23.692 Session name: UF123CW@sftp.section111.cms.hhs.gov (Ad-Hoc site)
. 2016-12-12 13:23:23.693 Host name: sftp.section111.cms.hhs.gov (Port: 10022)
. 2016-12-12 13:23:23.693 User name: UF123CW (Password: Yes, Key file: No, Passphrase: No)
. 2016-12-12 13:23:23.693 Tunnel: No
. 2016-12-12 13:23:23.693 Transfer Protocol: SFTP
. 2016-12-12 13:23:23.693 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2016-12-12 13:23:23.693 Disable Nagle: No
. 2016-12-12 13:23:23.693 Proxy: None
. 2016-12-12 13:23:23.693 Send buffer: 262144
. 2016-12-12 13:23:23.693 SSH protocol version: 2; Compression: No
. 2016-12-12 13:23:23.693 Bypass authentication: No
. 2016-12-12 13:23:23.693 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-12-12 13:23:23.693 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-12-12 13:23:23.693 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2016-12-12 13:23:23.693 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2016-12-12 13:23:23.693 Simple channel: Yes
. 2016-12-12 13:23:23.693 Return code variable: Autodetect; Lookup user groups: Auto
. 2016-12-12 13:23:23.693 Shell: default
. 2016-12-12 13:23:23.693 EOL: LF, UTF: Auto
. 2016-12-12 13:23:23.693 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2016-12-12 13:23:23.693 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-12-12 13:23:23.693 SFTP Bugs: Auto,Auto
. 2016-12-12 13:23:23.693 SFTP Server: default
. 2016-12-12 13:23:23.693 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-12-12 13:23:23.693 Cache directory changes: Yes, Permanent: Yes
. 2016-12-12 13:23:23.693 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2016-12-12 13:23:23.693 DST mode: Unix
. 2016-12-12 13:23:23.693 --------------------------------------------------------------------------
. 2016-12-12 13:23:23.693 Looking up host "sftp.section111.cms.hhs.gov" for SSH connection
. 2016-12-12 13:23:23.698 Connecting to 204.76.173.42 port 10022
. 2016-12-12 13:23:23.768 We claim version: SSH-2.0-WinSCP_release_5.9.3
. 2016-12-12 13:23:23.769 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:23.769 Detected network event
. 2016-12-12 13:23:23.856 Detected network event
. 2016-12-12 13:23:23.856 Server version: SSH-2.0-SFTP Server
. 2016-12-12 13:23:23.856 We believe remote version has SSH-2 channel request bug
. 2016-12-12 13:23:23.856 Using SSH protocol version 2
. 2016-12-12 13:23:23.857 Have a known host key of type dss
. 2016-12-12 13:23:23.857 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:23.860 Detected network event
. 2016-12-12 13:23:23.860 Doing Diffie-Hellman group exchange
. 2016-12-12 13:23:23.860 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.051 Detected network event
. 2016-12-12 13:23:24.051 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-12-12 13:23:24.065 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.190 Detected network event
. 2016-12-12 13:23:24.219 Host key fingerprint is:
. 2016-12-12 13:23:24.220 ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c
. 2016-12-12 13:23:24.220 Verifying host key dss 0xa56e9c01cacf1576 eb598282f91bad69 9dc46051eff05482 ef9ada70d28b18a5 69a325e2776ae50a 4e55ae2323a9984e c186c61403a27740 a15ecf1ab02785a5 2ff9fefa29f1d2ca cb339cbc4db3774f 31226411467dd54c 2dc19fbfa3cd2ae8 477f326d2f482e86 596dded1b046020a 972802f5a1dfa0ff 32e98de6e4f6c4c9 ,0xc897af89952c23da c81f95aa0ec72e55 07243ef5,0x7d3f6add9667bfa4 f62f1590fabbb552 15beb6cb61c0076a 02c0986d240f2db6 871637207f9433d2 6acd72447b2768b4 717ac4e9f37a16c9 aadfa61edfa76a1c 13667159242db96e 8da8060ff2a39c6e 0d4f2a468960e7a8 aa87270304be738d 7ef010baa643fbfe 4b0608eb9e6c2069 8ac4b200ddb317ef 81bd83a13fca2b51 ,0x3df23d1301f68608 a513ecc6895a2947 e32ae3460c4abba1 69dd929687babdc8 172ba0c4b6d91472 21f2c0c321ac863c f602a5bc91c5f420 d870c3d8b3d3b46d 1cc7e068a1dd6850 8963975a9d26a2c7 af46a6c24d5ecc0e 0f771250418ac12a 47670280848a0ea7 32c6815fe1221f95 a3fdcd26b88065c2 d3cf93da0407f064 with fingerprint ssh-dss 1024 46:64:05:cc:39:89:56:1b:3b:4c:fe:cc:3d:2d:7a:9c
. 2016-12-12 13:23:24.220 Host key matches configured key
. 2016-12-12 13:23:24.220 Initialised AES-256 SDCTR client->server encryption
. 2016-12-12 13:23:24.220 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-12-12 13:23:24.220 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.220 Detected network event
. 2016-12-12 13:23:24.220 Initialised AES-256 SDCTR server->client encryption
. 2016-12-12 13:23:24.220 Initialised HMAC-SHA1 server->client MAC algorithm
. 2016-12-12 13:23:24.220 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.432 Detected network event
! 2016-12-12 13:23:24.432 Using username "UF123CW".
. 2016-12-12 13:23:24.432 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.435 Detected network event
. 2016-12-12 13:23:24.435 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.522 Detected network event
. 2016-12-12 13:23:24.522 Server offered these authentication methods: password,publickey,keyboard-interactive
. 2016-12-12 13:23:24.522 Attempting keyboard-interactive authentication
. 2016-12-12 13:23:24.522 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.615 Detected network event
. 2016-12-12 13:23:24.615 Prompt (keyboard interactive, "SSH server: password", "Using keyboard-interactive authentication.
. 2016-12-12 13:23:24.615 Enter password for UF123CW", "Password:")
. 2016-12-12 13:23:24.615 Using stored password.
. 2016-12-12 13:23:24.615 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.874 Detected network event
. 2016-12-12 13:23:24.874 Access granted
. 2016-12-12 13:23:24.874 Opening session as main channel
. 2016-12-12 13:23:24.874 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:24.953 Detected network event
. 2016-12-12 13:23:24.953 Opened main channel
. 2016-12-12 13:23:24.953 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:25.182 Detected network event
. 2016-12-12 13:23:25.182 Waiting for the server to continue with the initialization
. 2016-12-12 13:23:25.186 Detected network event
. 2016-12-12 13:23:25.186 Started a shell/command
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
I'm not seeing this problem. It can be a problem of your local network.

Did you trying testing this from another location?
stoned1999
[View user's profile]

Joined: 2016-12-12
Posts: 2
I resolved it by reworking the code to retain/share a session between each function rather than the "Using / End using" pattern that I think the developer copied from the examples.

I'm guessing the constant open/close of the FTP connection was eventually rejected due to timing/excessive frequency by the server.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License