Skip to main content

Hi folks,

I’ve been given details to an SFTP server, and I can successfully connect to it using Winscp on my laptop:

 

I tried to setup connection in ONE desktop:

I put workflow task:

But I get an error:

14.11.2024 15:15:21 2INFO]     Using following licenses:
14.11.2024 15:15:21 2INFO] C:\Users\mkwok\license_hamilton_USER_v14_subscription_2025-01-29.plf
14.11.2024 15:15:21 2INFO] ============================================================
14.11.2024 15:15:21 2INFO] This is a subscription USER license for developers' laptops for "Hamilton". It expires on 2025-01-29.
14.11.2024 15:15:21 2INFO] ============================================================
2024-11-14 15:15:21 2INFO] com.ataccama.lib.securityutil.javaencryption.DefaultEncryptionEngine messageId=createDefaultKeyProvider reason=the 'properties.encryption.keystore' property not specified
2024-11-14 15:15:21 2INFO] com.ataccama.lib.securityutil.javaencryption.DefaultEncryptionEngine messageId=createDefaultKeyProvider reason=the 'internal.encryption.keystore' property not specified
14.11.2024 15:15:22 2INFO] Processor started
14.11.2024 15:15:22 2INFO] Task 'SFTP Download File' : IN_QUEUE
14.11.2024 15:15:22 2INFO] Task 'SFTP Download File' : RUNNING
com.ataccama.adt.internal.core.runtime.EwfRuntimeException: Error downloading /pcs-data-sftp-prod/PCSHAM/out/ toc:\Ataccama\14.5.3\workspace\sandbox\flatcat\download - JSch error: java.net.UnknownHostException: sftp
com.jcraft.jsch.JSchException: java.net.UnknownHostException: sftp
at com.jcraft.jsch.Util.createSocket(Util.java:379)
at com.jcraft.jsch.Session.connect(Session.java:217)
at com.jcraft.jsch.Session.connect(Session.java:187)
at com.ataccama.adt.tools.SFTPClient.download(SFTPClient.java:230)
at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:142)
at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)
Caused by: java.net.UnknownHostException: sftp
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
at java.base/java.net.Socket.<init>(Socket.java:287)
at com.jcraft.jsch.Util.createSocket(Util.java:375)
... 5 more

Cause: java.net.UnknownHostException: sftp
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
at java.base/java.net.Socket.<init>(Socket.java:287)
at com.jcraft.jsch.Util.createSocket(Util.java:375)
at com.jcraft.jsch.Session.connect(Session.java:217)
at com.jcraft.jsch.Session.connect(Session.java:187)
at com.ataccama.adt.tools.SFTPClient.download(SFTPClient.java:230)
at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:142)
at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)

at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:144)
at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)
14.11.2024 15:15:24 2INFO] Task 'SFTP Download File' : failed with exception: Error downloading /pcs-data-sftp-prod/PCSHAM/out/ toc:\Ataccama\14.5.3\workspace\sandbox\flatcat\download - JSch error: java.net.UnknownHostException: sftp
com.jcraft.jsch.JSchException: java.net.UnknownHostException: sftp
at com.jcraft.jsch.Util.createSocket(Util.java:379)
at com.jcraft.jsch.Session.connect(Session.java:217)
at com.jcraft.jsch.Session.connect(Session.java:187)
at com.ataccama.adt.tools.SFTPClient.download(SFTPClient.java:230)
at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:142)
at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)
Caused by: java.net.UnknownHostException: sftp
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
at java.base/java.net.Socket.<init>(Socket.java:287)
at com.jcraft.jsch.Util.createSocket(Util.java:375)
... 5 more

Cause: java.net.UnknownHostException: sftp
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
at java.base/java.net.Socket.<init>(Socket.java:287)
at com.jcraft.jsch.Util.createSocket(Util.java:375)
at com.jcraft.jsch.Session.connect(Session.java:217)
at com.jcraft.jsch.Session.connect(Session.java:187)
at com.ataccama.adt.tools.SFTPClient.download(SFTPClient.java:230)
at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:142)
at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)

14.11.2024 15:15:24 2INFO] --- Stop initiated ---
14.11.2024 15:15:24 2INFO] Processor has finished with state: FINISHED_FAILURE

Open workflow state file

Any ideas? Is it the syntax of the server connection setup? I’ve tried various adding / removing ports and slashes but still get similar error messages.

Hi ​@may_kwok, it should be without prefix pcsftp.verisk.com:22

 


Hi ​@may_kwok did the solution from ​@AKislyakov help? If yes, could you please let me know so I can close this thread 👀thank you!


HI ​@AKislyakov ​@Cansu ,

Yes-ish!

I managed to set it up like so:

 

And managed to download a single file if I specify the filename:

This download was successful.

 

However, I wanted to download the entire folder. So I set the download task to this:

I get this error:

21.11.2024 11:11:49 1INFO]     Task 'SFTP Download Folder' : failed with exception: Error downloading out/ toc:\Ataccama\14.5.3\workspace\sandbox\flatcat\download_folder - Error: Remote file out/ does not exists. 
com.ataccama.adt.internal.core.runtime.EwfRuntimeException: Error downloading out/ toc:\Ataccama\14.5.3\workspace\sandbox\flatcat\download_folder - Error: Remote file out/ does not exists. 
    at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:144)
    at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)

 

If I configure the download task like so:

I get this error:

21.11.2024 11:14:21 1INFO]     Task 'SFTP Download Folder' : RUNNING
com.ataccama.adt.internal.core.runtime.EwfRuntimeException: Error downloading out toc:\Ataccama\14.5.3\workspace\sandbox\flatcat\download_folder - Error: Remote file out does not exists. 
    at com.ataccama.adt.task.exec.SFTPDownloadFile$EwfCustomStep.run(SFTPDownloadFile.java:144)
    at com.ataccama.adt.internal.core.runtime.EwfTaskProcessor$ThreadSlot.run(EwfTaskProcessor.java:372)

 

I had expected it to be able to work for directory. I tried using * wildcard and that doesn’t work either:

Do I have no choice but to iterate over filenames?


Hi ​@may_kwok,

the “out” variant should work, but it is subject to permissions setup on the SFTP server.

You'll need read permission on the parent folder. If it is not feasible, the common workaround is to add another layer to folder hierarchy, like “out/PCAS”


Hm…. the source server is provided by a service provider so I don’t think they’d allow that. I’ll just build my solution around specific filenames - we should be looking at specific files anyway. I had hoped to be able to just grab all files but what I have now should be ok for the meantime.

Thanks!


Reply