SFTP Functions

Overview

Contains multiple Smart Services for interacting with a remote file server via SFTP, FTP, or SCP.  Using these services, an Appian application can be configured to send and receive files, folders, and metadata in a process.  Features support for zlib compression.

Key Features & Functionality

Smart Services included:

  • SFTP:
    • Send File Over SFTP
    • Receive File Over SFTP
    • Get Remote Folder Contents Over SFTP
    • Create Folder Over SFTP
    • Remove File Over SFTP
    • Receive Files In Folder Over
    • SFTP Rename File Over SFTP
  • SCP:
    • Send File Over SCP
    • Receive File Over SCP
  • FTP:
    • Send File Over FTP
    • Receive File Over FTP
    • Get Remote Folder Contents Over FTP
    • Receive Files In Folder Over FTP
    • Remove File Over FTP
    • Rename File Over FTP
  • FTPS
    • Get Remote Folder Contents Over FTPS
    • Receive File Over FTPS
    • Receive Files In Folder Over FTPS
    • Send File Over FTPS

Functions:

  • getfoldercontentsoverftp
  • getfoldercontentsoverftps
  • getfoldercontentsoversftp
  • All smart services in the package use Secure Credentials Store.
Anonymous
Parents Comment Children
  • Hi ,

    We believe it to be a configuration issue from sftp server/appian server. Please try out the below steps

    1. Check Hostname, Password username private key and the passphrase configured in the third party credentials is correct in the process model

    2. Check if the same file is received using sftp tools like WinSCP.If it works please share the additional configurations if any made in WinSCP to achieve the connection

    3. If still unresolvable share us the sandbox environment to replicate the issue

  • Hi, raghulvishnud,

    Please find the attached log file.

    2021-08-05 03:05:09,229 [Appian Work Item - 6434 - execution01 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP - Error connecting to SFTP server
    com.jcraft.jsch.JSchException: Auth fail
            at com.jcraft.jsch.Session.connect(Session.java:519)
            at com.jcraft.jsch.Session.connect(Session.java:183)
            at com.appian.ps.plugins.sftpsmartservices.SFTPConfig.connect(SFTPConfig.java:177)
            at com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP.run(ReceiveFileOverSFTP.java:69)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
            at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
            at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
            at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:116)
            at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
            at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:123)
            at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
            at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:94)
            at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
    2021-08-05 03:05:09,230 [Appian Work Item - 6434 - execution01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268437187, classname=com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: userMsg[error.sftp_conn=Error establishing SFTP connection. Confirm your hostname, username and password. See application server log for more details. Error Message: Auth fail]
    at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
            at com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP.createException(ReceiveFileOverSFTP.java:209)
            at com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP.run(ReceiveFileOverSFTP.java:72)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
            at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
            at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
            at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
            at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
            at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:116)
            at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
            at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:123)
            at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
            at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:94)
            at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
    Caused by: com.jcraft.jsch.JSchException: Auth fail
            at com.jcraft.jsch.Session.connect(Session.java:519)
            at com.jcraft.jsch.Session.connect(Session.java:183)
            at com.appian.ps.plugins.sftpsmartservices.SFTPConfig.connect(SFTPConfig.java:177)
            at com.appian.ps.plugins.sftpsmartservices.ReceiveFileOverSFTP.run(ReceiveFileOverSFTP.java:69)
            ... 19 more