One Star

TFTPGet doesn't download files (sftp)

Hi everyone,
I have made a simple job that makes use of tftpconnection, tftpfilelist and tftpget. I run it, then everything looks fine, I see a "2 execs finished" message on the link between tftpfilelist and tftpget (because there are only 2 files in my folder, I assume that the job can indeed find the files on the SFTP server).
Unfortunately, nothing gets downloaded. I have changed my target directory many times and it doesn't work.
I can, however, successfully download files with other ftp tools. So I think there is something wrong here with Talend.
Here are the screenshots:



I googled for similar issues, but there isn't a clear solution. I tried a direct link from tftpconnection to tftpget and that also didn't work. Typing in the exact name of the file in the tftpget's filemask section didn't work (it doesn't see the files at all if I do that).
If one of the more knowledgable developers could chime in, that would be really great.
Thanks!
2 REPLIES
Six Stars

Re: TFTPGet doesn't download files (sftp)

You aren't specifying any files to get. You need to enter a file mask(like "*.csv") in your list component, then you need to fetch the current file name from that component and pass it as the file mask for the GET component to use (like ((String)globalMap.get("tFTPFileList_2_CURRENT_FILE")) ).
One Star

Re: TFTPGet doesn't download files (sftp)

Thanks, I tried that before after reading the tftp documentation, then decided to try it again this morning.
Now I get this error:
Exception in component tFTPGet_2
4:
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:853)
at edi_on_nav.test_0_1.TEST$1SFTPGetter_tFTPGet_2.downloadFile(TEST.java:659)
at edi_on_nav.test_0_1.TEST$1SFTPGetter_tFTPGet_2.getFiles(TEST.java:637)
at edi_on_nav.test_0_1.TEST.tFTPFileList_2Process(TEST.java:748)
at edi_on_nav.test_0_1.TEST.tFTPConnection_3Process(TEST.java:417)
at edi_on_nav.test_0_1.TEST.runJobInTOS(TEST.java:1006)
at edi_on_nav.test_0_1.TEST.main(TEST.java:871)
Caused by: java.io.FileNotFoundException: .... (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:829)
... 6 more
So I am guessing "Access is denied" means that there is something wrong with this computer's access rights to the SFTP server's folders, is that correct?