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

giermo@...

issue resolved. Firewall settings needed explicit data port rules for ftp

issue resolved. Firewall settings needed explicit data port rules for ftp
giermo@...

Thanks for the quick response.

Please see below for logs of powershell code. As seen it can establish connection, but then times out.

GUI mode on this particular machine doesn't work as this version lacks the (TLS/SSL Explicit encryption) option that my desktop version(previous gui logs provided) had that worked.

attempted to run script on my pc with the latest winscp version and .dll, but then i got syntax error of
"Property 'SslHostCertificateFingerprint' cannot be found on this object; make sure it exists and is settable." - which was not present in the production version that i included logs for.

Thanks for the help


. 2016-02-29 12:08:41.827 --------------------------------------------------------------------------

. 2016-02-29 12:08:41.827 WinSCP Version 5.5.2 (Build 4130) (OS  Service Pack ******* - Windows Server 2008 R2 Standard)
. 2016-02-29 12:08:41.827 Configuration: nul
. 2016-02-29 12:08:41.827 Local account: **********\Admin*******
. 2016-02-29 12:08:41.827 Working directory: C:\Program Files (x86)\WinSCP
. 2016-02-29 12:08:41.827 Process ID: 5872
. 2016-02-29 12:08:41.827 Command-line: "C:\Program Files (x86)\WinSCP\winscp.exe" /xmllog="C:\*******\AppData\Local\Temp\3\wscp1B88.031ABC8E.tmp" /xmlgroups /nointeractiveinput /dotnet=552  /ini=nul /log="C:\Users*******\Desktop\PSLogs.log"  /console /consoleinstance=_7048_15989691_504
. 2016-02-29 12:08:41.827 Time zone: Current: GMT-5, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 03/13/2016, DST End: 11/06/2016
. 2016-02-29 12:08:41.827 Login time: February-29-16 12:08:41 PM
. 2016-02-29 12:08:41.827 --------------------------------------------------------------------------
. 2016-02-29 12:08:41.827 Script: Retrospectivelly logging previous script records:
> 2016-02-29 12:08:41.827 Script: option batch on
< 2016-02-29 12:08:41.827 Script: batch           on       
> 2016-02-29 12:08:41.827 Script: option confirm off
< 2016-02-29 12:08:41.827 Script: confirm         off       
> 2016-02-29 12:08:41.827 Script: open -explicittls -certificate="****************************" -passive=1 -timeout=40 *******
. 2016-02-29 12:08:41.827 --------------------------------------------------------------------------
. 2016-02-29 12:08:41.827 Session name: ******* (Ad-Hoc site)
. 2016-02-29 12:08:41.827 Host name: ******* (Port: *******)
. 2016-02-29 12:08:41.827 User name: ******* (Password: Yes, Key file: No)
. 2016-02-29 12:08:41.827 Tunnel: No
. 2016-02-29 12:08:41.827 Transfer Protocol: FTP
. 2016-02-29 12:08:41.827 Ping type: C, Ping interval: 30 sec; Timeout: 40 sec
. 2016-02-29 12:08:41.827 Proxy: none
. 2016-02-29 12:08:41.827 Send buffer: 262144
. 2016-02-29 12:08:41.827 FTP: FTPS: Explicit TLS; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2016-02-29 12:08:41.827 Session reuse: Yes
. 2016-02-29 12:08:41.827 TLS/SSL versions: SSLv2-TLSv1.2
. 2016-02-29 12:08:41.827 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-02-29 12:08:41.827 Cache directory changes: Yes, Permanent: Yes
. 2016-02-29 12:08:41.827 DST mode: 1; Timezone offset: 0h 0m
. 2016-02-29 12:08:41.827 --------------------------------------------------------------------------
. 2016-02-29 12:08:41.827 Connecting to *******.com ...
. 2016-02-29 12:08:42.093 Connected with *******.com, negotiating TLS connection...
< 2016-02-29 12:08:42.202 220 Microsoft FTP Service
> 2016-02-29 12:08:42.202 AUTH TLS
< 2016-02-29 12:08:42.327 234 AUTH command ok. Expecting TLS Negotiation.
. 2016-02-29 12:08:43.122 Using TLSv1.2, cipher TLSv1/SSLv3: DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
. 2016-02-29 12:08:43.122 TLS connection established. Waiting for welcome message...
> 2016-02-29 12:08:43.122 USER *******
< 2016-02-29 12:08:43.216 331 Password required
> 2016-02-29 12:08:43.216 PASS ***********
< 2016-02-29 12:08:43.325 230 User logged in.
> 2016-02-29 12:08:43.325 SYST
< 2016-02-29 12:08:43.419 215 Windows_NT
> 2016-02-29 12:08:43.419 FEAT
< 2016-02-29 12:08:43.528 211-Extended features supported:
< 2016-02-29 12:08:43.528  LANG EN*
< 2016-02-29 12:08:43.528  UTF8
< 2016-02-29 12:08:43.528  AUTH TLS;TLS-C;SSL;TLS-P;
< 2016-02-29 12:08:43.528  PBSZ
< 2016-02-29 12:08:43.528  PROT C;P;
< 2016-02-29 12:08:43.528  CCC
< 2016-02-29 12:08:43.528  HOST
< 2016-02-29 12:08:43.528  SIZE
< 2016-02-29 12:08:43.528  MDTM
< 2016-02-29 12:08:43.528  REST STREAM
< 2016-02-29 12:08:43.528 211 END
> 2016-02-29 12:08:43.528 OPTS UTF8 ON
< 2016-02-29 12:08:43.621 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> 2016-02-29 12:08:43.621 PBSZ 0
< 2016-02-29 12:08:43.731 200 PBSZ command successful.
> 2016-02-29 12:08:43.731 PROT P
< 2016-02-29 12:08:43.824 200 PROT command successful.
. 2016-02-29 12:08:43.824 Connected
. 2016-02-29 12:08:43.824 --------------------------------------------------------------------------
. 2016-02-29 12:08:43.824 Using FTP protocol.
. 2016-02-29 12:08:43.824 Doing startup conversation with host.
> 2016-02-29 12:08:43.824 PWD
< 2016-02-29 12:08:43.933 257 "/" is current directory.
. 2016-02-29 12:08:43.933 Getting current directory name.
. 2016-02-29 12:08:43.933 Startup conversation with host finished.
< 2016-02-29 12:08:43.933 Script: Active session: [1] *******@ftp*******com
> 2016-02-29 12:08:44.308 Script: ls -- "/LTS/"
. 2016-02-29 12:08:44.308 Retrieving directory listing...
> 2016-02-29 12:08:44.308 CWD /LTS/
< 2016-02-29 12:08:44.401 250 CWD command successful.
> 2016-02-29 12:08:44.401 PWD
< 2016-02-29 12:08:44.510 257 "/LTS" is current directory.
> 2016-02-29 12:08:44.510 TYPE A
< 2016-02-29 12:08:44.604 200 Type set to A.
> 2016-02-29 12:08:44.604 PASV
< 2016-02-29 12:08:44.698 227 Entering Passive Mode (199,242,62,246,38,191).
> 2016-02-29 12:08:44.698 LIST -a
< 2016-02-29 12:08:44.807 150 Opening ASCII mode data connection.
. 2016-02-29 12:09:05.772 Transfer channel can't be opened. Reason: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
. 2016-02-29 12:09:05.787 Could not retrieve directory listing
> 2016-02-29 12:09:14.273 PWD
. 2016-02-29 12:09:54.830 Timeout detected.
. 2016-02-29 12:09:54.830 LIST with -a failed, walling back to pure LIST
< 2016-02-29 12:09:54.830 Script: Lost connection.
< 2016-02-29 12:09:54.830 Script: Error listing directory '/LTS'.
martin

Re: FTPS - Transfer channel cant be opened PS error - GUI works

Can you attach a full log files?

Do you run GUI and the script on the same machine using the same local account?

In what context do you run the script?
giermo@...

FTPS - Transfer channel cant be opened PS error - GUI works

Hello

I have as script that is using FTPS and powershell.

The script connects, is able to list contents, but then i keep getting the error below.
Gui mode of winscp connects no issues, just power shell code has issues.

I believe it has to do with list-a issues, but that all i know so far.

Any help would be appreciated.

PS code - that has issues
> 2016-02-29 11:52:32.960 CWD /FLDR/

< 2016-02-29 11:52:33.069 250 CWD command successful.
> 2016-02-29 11:52:33.069 PWD
< 2016-02-29 11:52:33.178 257 "/FLDR" is current directory.
> 2016-02-29 11:52:33.178 TYPE A
< 2016-02-29 11:52:33.288 200 Type set to A.
> 2016-02-29 11:52:33.288 PASV
< 2016-02-29 11:52:33.381 227 Entering Passive Mode (199,242,62,246,38,180).[b]
> 2016-02-29 11:52:33.381 LIST -a
< 2016-02-29 11:52:33.490 150 Opening ASCII mode data connection.
. 2016-02-29 11:52:54.440 Transfer channel can't be opened. Reason: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.[/b]
. 2016-02-29 11:52:54.472 Could not retrieve directory listing
> 2016-02-29 11:53:03.940 TYPE I
. 2016-02-29 11:53:43.485 Timeout detected.
. 2016-02-29 11:53:43.485 LIST with -a failed, walling back to pure LIST
< 2016-02-29 11:53:43.485 Script: Lost connection.


GUI logs that worked

< 2016-02-29 12:10:53.625 257 "/FLDR" is current directory.   

. 2016-02-29 12:10:53.626 Retrieving directory listing...   
> 2016-02-29 12:10:53.626 TYPE A   
< 2016-02-29 12:10:53.731 200 Type set to A.   
> 2016-02-29 12:10:53.732 PASV   
< 2016-02-29 12:10:53.839 227 Entering Passive Mode (199,242,62,246,38,193).   
> 2016-02-29 12:10:53.839 LIST -a   
. 2016-02-29 12:10:53.839 Connecting to XX.XX.XX.XX:9921 ...   
< 2016-02-29 12:10:53.944 150 Opening ASCII mode data connection.   
. 2016-02-29 12:10:54.043 Session ID reused   
. 2016-02-29 12:10:54.043 TLS connection established   
. 2016-02-29 12:10:54.147 02-19-16  04:01AM                file.xls   
< 2016-02-29 12:10:54.782 226 Transfer complete.