Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rohsuh
Contributor
Contributor

tFileGet does not download files over FTPS

I am working on a job in Talend Data Management Platform 

Version: 7.2.1

Build id: 20210802_0157-patch

The job pulls a file from a FTP Server over FTPS protocol. But the tFTPGet component keeps erroring out eventhough we have specified all the necessary credentials required to connect.

 

The flow of the job until the point of error is as follows

 

tFTPConnection

|

OnSubjobOk--> tFileExists (true)-> tFileList -->tIteratetoFlow_1-->tSortRow-->tSampleRow_1-->tSetGlobalVar

|

OnSubjobOk -->tFTPGet - OnComponentOk-> tFileCopy (Error Occuring here)

 

The connection works as you can see below.

tFTPGet_1 - Start to work.

tFTPGet_1 - Parameters:USE_EXISTING_CONNECTION = false | HOST = context.Host | FTPS_PORT = context.port | USERNAME = context.Username | PASSWORD = ENC:... | FTPS = true | KEYSTORE_FILE = context.Keystore_Path | KEYSTORE_PASS = ENC:... | LOCALDIR = context.temp_dir | REMOTEDIR = context.Ftp_Dir | PERL5_REGEX = false | FILES = [{FILEMASK=(String)globalMap.get("latest_file_name")}] | CONNECT_MODE = PASSIVE | SECURITY_MODE = IMPLICIT | ENCODING = "UTF-8" | DIE_ON_ERROR = true | USE_PROXY = false | FTPS_PROT = "P" | FTPS_PROTECTION_BUFF_SIZE = 0 | REMOTE_VERIFICATION = true | 

tFTPGet_1 -FTPS security Mode is IMPLICIT.

tFTPGet_1 - Attempt to connect to 'ftp-server' with username 'username'.

tFTPGet_1 - Connect to 'ftp-server' has succeeded.

tFTPGet_1 - Using the passive mode.

tFTPGet_1 - Downloading files from the server.

tFTPGet_1 - Closing the connection to the server.

tFTPGet_1 - Connection to the server closed.

tFTPGet_1 - Downloaded files count: 0.

tFTPGet_1 - Done.

tFileCopy_1 - Start to work.

tFileCopy_1 - Parameters:FILENAME = context.temp_dir + "/" + ((String)globalMap.get("latest_file_name")) | ENABLE_COPY_DIRECTORY = false | DESTINATION = context.incoming_dir | RENAME = false | REMOVE_FILE = false | REPLACE_FILE = true | CREATE_DIRECTORY = true | FAILON = true | 

 

But the job keeps failing with the following error

Exception in component tFileCopy_1 (job name)

java.lang.RuntimeException: The source File "temp file location and file name" does not exist or is not a file.

 

Connection properties are as follows

FTPS security Mode is IMPLICIT

Using the passive mode.

Encoding UTF-8

Labels (2)
7 Replies
Anonymous
Not applicable

How are you selecting the file you want to get?

 

rohsuh
Contributor
Contributor
Author

@Richard Hall​ I don't think I clearly understand your question as to what details you are expecting me to provide to troubleshoot this?

 

But I am specifying the remove directory (FTP Server) where the file resides, the Talend Temp Directory (Job Folder directory) and I am mentioning the Filemask (which is a Global Variable set from the output of at the beginning of the job - ) in the tFTPGet.

The Remote Directory is defined as a context variable.

 

tFTPConnection

|

OnSubjobOk--> tFileExists (true)-> tFileList -->tIteratetoFlow_1->tSortRow->tSampleRow_1->tSetGlobalVar

|

OnSubjobOk -->tFTPGet - OnComponentOk-> tFileCopy (Error Occuring here)

 

Hope this makes sense.

Anonymous
Not applicable

In your error message it says....

 

java.lang.RuntimeException: The source File "temp file location and file name" does not exist or is not a file.

 

The source file should be named. But it says "temp file location and file name". I am curious as to how your tFileGet is configured. Could you show a screenshot of this?

 

Also, your second SubJob (after the tFTPConnection component) looks a little strange. What is this trying to do? The tSetGlobalVar can only store one value per key used. This SubJob looks like you may be returning multiple files. If you aren't returning multiple files, what is the tFileExists and tFileList for? There may be some perfectly reasonable logic for this, but I cannot figure it out and it could be a cause of your issue.

rohsuh
Contributor
Contributor
Author

@Richard Hall​ I was able to get in touch with Talend Support and the Talend Support Engineer was able to find the bug. Its actually the Filemask field in tFTPGet that does not actually work. If you insert * as the filemask, the tFTPGet works without any errors but gets all the files in the remote directory and dumps it in the said temp folder.

 

There was an additional change that I made locally after speaking with the Talend Support Engineer which was to add the remote server's CA cert to the Talend Studio JRE cacert using keytool. This got me past the above mentioned error. But the Connection to server kept closing when I put a very specific Filemask other than * and ran the job .

 

This was found by Talend Support Engineer and reported back to me. It has been fixed in Talend 7.3.

 

Before changing Filemask from Global Variable (populated by tSetGlobalVar)

0695b00000OBHRgAAP.pngAfter changing Filemask to *

0695b00000OBHQxAAP.png

Anonymous
Not applicable

Thanks for coming back and updating the post @Rohini Subash​ 

rohsuh
Contributor
Contributor
Author

@Richard Hall​  I am now waiting for a patch from Talend for version 7.2 as upgrade to version 7.3 is ongoing and not going to be complete anytime soon.

Anonymous
Not applicable

I would recommend that you speak to Support about this. They have all of the most up to date information on patch availability.