EldoS | Feel safer!

Software components for data protection, secure storage and transfer

FFTPSSLClient.GetFileList

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#14314
Posted: 08/29/2010 19:01:15
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi Guys,

I'm in the process of testing the FFTPSSLClient with my project to develop communication interface with a remote server using 'FTP over SSL' protocol. I managed to log in and check the current directory in the remote server but when I tried to list file in the remote server directory current directory, where there is no file available, the process took a lengthy time only to drop out with error 'Control channel transfer error'.

Note that the remote server was configured to terminate communication after 60 seconds of no activity. I would expect that the function in-question would drop out gracefully with no list of file returned.

Is there a parameter that is being applied to repeat the execution of the GetFileList for a number of times when no file is detected, which was interrupted by the remote server?

Here's my transmission log:
-------------------- TRANSMISSION LOG -----------------------

Connecting to testorders.metcash.com:1025
Connected
Text Data Line: <<<220 <<<Connect:Enterprise UNIX 2.2.00 Secure FTP>>> at mboxfox3 FTP server ready. Time = 12:31:10

Text Data Line: >>>AUTH SSL

Text Data Line: <<<234 AUTH TLS-P/SSL OK.

Certificate received
Issuer: CN=testorders.metcash.com, C=AU, O=METCASH TRADING LIMITED, L=SILVERWATER
Subject: CN=testorders.metcash.com, C=AU, O=METCASH TRADING LIMITED, L=SILVERWATER
Certificate is OK - assigning to ClientCertStorage

Text Data Line: >>>USER 99999919

Text Data Line: <<<331 Password required for <UserName>.

Text Data Line: >>>PASS <******>

Text Data Line: <<<230 Connect:Enterprise UNIX login ok, access restrictions apply.

Text Data Line: >>>PBSZ 0

Text Data Line: <<<200 PBSZ 0 OK.

Text Data Line: >>>PROT P

Text Data Line: <<<200 PROT P OK, data channel will be secured.

Text Data Line: >>>FEAT

Text Data Line: <<<500 'FEAT': command not understood.

Logged in
SSL version is SSL3
Text Data Line: >>>PWD

Text Data Line: <<<257 "/<dir_name>" is current directory.

Current Dir: /<dir_name>
Start getting file list
Text Data Line: >>>TYPE A

Text Data Line: <<<200 Type set to A.

Text Data Line: >>>PASV

Text Data Line: <<<227 Entering Passive Mode (192,168,248,59,211,232)

Text Data Line: >>>LIST

Control channel transfer error

Disconnecting
Disconnected

---------------- END OF TRANSMISSION LOG -----------------

Hope to get a clearer picture on my issue with your comments.
#14316
Posted: 08/29/2010 23:44:41
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

The address returned by the server in response to the PASV command is local network address. If the server you are connecting to is not within the scope of local network, please check that the AdjustPasvAddress property is set to true in your code (this property is set to true by default, but you might be turning it off somewhere).
#14323
Posted: 08/30/2010 21:53:36
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi Innokentiy,

Thanks for your prompt comments. Please note that I am testing the function in question using your sample application 'SimpleFTPSDemo'. I have debugged your sample application and the AdjustPasvAddress property was True at all times. You are correct that such property was True by default and your sample application is not changing its value.

Any further suggestion would be greatly appreciated.

Note that using Core FTP LE application, its function to list file from the remote server in question successfully returned 'no file' message.
#14324
Posted: 08/31/2010 06:28:11
by Ken Ivanov (EldoS Corp.)

The server may also require SSL session resumption to be used. Please try to set the UseSSLSessionResumption property to true and check if it changes something.

If it doesn't, could you please check whether the exception is thrown immediately after LIST command is sent, or after a little while?
#14327
Posted: 08/31/2010 18:28:43
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi InnoKentiy,

Setting the UseSSLSessionResumption property to True (False by default) appears to have not changed anything.

The LIST command took around 2 minutes to drop out with exception.

Further suggestions would be greatly appreciated. Thanks.
#14328
Posted: 09/01/2010 01:47:11
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

In addition, could you tell me what caused this error '550 *** ERROR *** NO BATCHES FOR TRANSMISSION' when trying to download a known ascii file from remote server. Thanks.
#14333
Posted: 09/01/2010 02:51:21
by Ken Ivanov (EldoS Corp.)

Thank you for checking that.

The delay of 2 minutes is a symptom of network connectivity issue (the connection is dropped by timeout). Could you please try to turn the firewall off (if it's on) and try to connect having it disabled?

If firewall is not the case, let's try to narrow down the issue:
1) Does your server allow unencrypted connections (probably there are accounts for testing or diagnostic purposes)? If it does, please try to disable security and check whether requesting a directory listing in unecrypted mode works.
2) Could you please post a connection log of Core FTP here?

Quote
In addition, could you tell me what caused this error '550 *** ERROR *** NO BATCHES FOR TRANSMISSION' when trying to download a known ascii file from remote server.

The meaning of 550 error is "File unavailable (e.g., file not found, no access)". Please re-check that you are passing a correct path to the remote file (probably your server requires you to provide a full or, vice versa, relative path to the file).
#14341
Posted: 09/01/2010 19:00:56
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi InnoKentiy, Thanks for your comments. Note that the module I'm developing would be used by our clients (retailers) who would love to have an automatic FTP link with the remote server I'm currently dealing with to retrieve their electronic invoice files automatically, instead of using an external application just to download their invoice file. And as such, once I successfully downloaded a file from such remote server, we would be buying full license for SSLBlackbox.

I was notified by the staff manning the remote server that the user profile I'm using could only download an specific filename and not allowed to list stored files. Would be nice if these limitations been made available a bit earlier.

My concern is now focus onto the error 550 from TElSimpleFTPSClient.Receive. Is this function somehow changes the status of the source file, such as making it exclusive for retrieval to avoid any conflict? Just want to make sure that the 'Receive' function simply reads the source file and writes to my stream file.

Thanks a lot for your usual prompt response.
#14342
Posted: 09/02/2010 00:17:51
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi InnoKentiy, I believe that the light at the end of the tunnel is indeed flickering so to speak. With a new ascii file loaded to the server today, I was able to download such file using CORE FTP LE with the following setting. But TElSimpleFTPSClient.Receive now generates the original error 'Control chanel transfer error'

CORE FTP LE setting:

Port: 1025
Timeout: 60
Retries: 2
PASV ticked
Connection: AUTH SSL
SSL Options: SL Listings; SSL Transfer; Clear (CCC); Windows SSL - ALL ticked.

CORE FTP LE managed to display the contents of the default directory of the remote server and I could transfer down the file listed.

How would I match the CORE FTP LE setting within the TElSimpleFTPSClient? or is there a different way
#14343
Posted: 09/02/2010 00:33:55
by Henry Mabuti (Standard support level)
Joined: 08/26/2010
Posts: 9

Hi Innokentiy,

Here's the log from CORE FTP LE successfully downloaded the ascii file from the remote server.

------ START OF LOG ------------
Resolving testorders.metcash.com...
Connect socket #1824 to 203.47.212.125, port 1025...
220 <<<Connect:Enterprise UNIX 2.2.00 Secure FTP>>> at mboxfox3 FTP server ready. Time = 15:18:54
AUTH SSL
234 AUTH TLS-P/SSL OK.
USER <User Name>
331 Password required for <User Name>.
PASS **********
230 Connect:Enterprise UNIX login ok, access restrictions apply.
PBSZ 0
200 PBSZ 0 OK.
PROT P
200 PROT P OK, data channel will be secured.
CCC
200 CCC Context Enabled.
SYST
500 '': command not understood.
Keep alive off...
PWD
257 "/99999919" is current directory.
PASV
227 Entering Passive Mode (203,47,212,125,224,147)
LIST
Connect socket #1836 to 203.47.212.125, port 57491...

150 Opening ASCII mode data connection for .
226 Transfer complete.
Transferred 65 bytes in 0.008 seconds
File exists, prompting user...
elecinvc overwritten...
TYPE I
200 Type set to I.
PASV
227 Entering Passive Mode (203,47,212,125,224,150)
RETR elecinvc
Connect socket #1876 to 203.47.212.125, port 57494...
150 Opening BINARY mode data connection for elecinvc.

226 Transfer complete.
elecinvc - 1142 bytes transferred
Transfer time: 00:00:07
QUIT
221 Goodbye.

---- END OF LOG --------
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 5880 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!