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:
All smart services in the package use Secure Credentials Store.
Hi LukeVaughan
, Please try below
Has anyone had issues using this plugin with v21.3?
SFTP issue deleting files in our recently upgraded environment: 1) File deletion response sometimes not getting sent properly (false positive) for the FTP folder, 2) requesting multiple files, typically more than 5, causes files not to be removed.
Any ideas about the root cause for these issues and potential work-around, such as automatic retry?
Hi Elijahp0001,
We have the same problem, can you tell me how you solved it?
Greetings and thank you
Hi mwiseman1 ,
We will try recreating this scenario in our environment. It would be helpful if you can please share the log files to understand to recreate the scenario
This sounds like the issue we now have, any resolution?
I tried to delete 2 files parallel in our environment which is in 21.3 and received no false positives and files were deleted successfully. Please share with us the configuration of the node in the environment and the log files to reproduce the scenario and provide a solution
Hi!
I'm also having the same problem. I'm trying to get some documents over SFTP.
Before the 7-8th document everithing works fine, but after this it starts to throw a timeout exception,as follows:
2021-11-11 09:20:28,224 [Appian Work Item - 872416 - execution02 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP - Error connecting to SFTP server com.jcraft.jsch.JSchException: Session.connect: java.net.SocketException: Connection timed out (Read failed) at com.jcraft.jsch.Session.connect(Session.java:565) at com.jcraft.jsch.Session.connect(Session.java:183) at com.appian.ps.plugins.sftpsmartservices.SFTPConfig.connect(SFTPConfig.java:178) at com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP.run(GetRemoteDirectoryContentsOverSFTP.java:65) 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:113) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.process(UnattendedJavaActivityRequest.java:41) at com.appiancorp.process.engine.ProcessEngineServiceImpl.processUnattendedRequest(ProcessEngineServiceImpl.java:162) at com.appiancorp.process.engine.ProcessEngineServiceImpl.processToNextAttended(ProcessEngineServiceImpl.java:228) at sun.reflect.GeneratedMethodAccessor2934.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.appiancorp.util.MethodInvocationReflectionImpl.proceed(MethodInvocationReflectionImpl.java:23) at com.appiancorp.security.authz.AuthorizationMethodInterceptor.invoke(AuthorizationMethodInterceptor.java:54) at com.appiancorp.services.ServiceManager$ServiceInvocationHandler.invoke(ServiceManager.java:479) at com.sun.proxy.$Proxy298.processToNextAttended(Unknown Source) at com.appiancorp.process.design.service.ProcessDesignServiceXmlImpl.initiateProcess(ProcessDesignServiceXmlImpl.java:1052) at com.appiancorp.process.design.service.ExtendedProcessDesignServiceJavaImpl.initiateProcessWithFullResult(ExtendedProcessDesignServiceJavaImpl.java:390) at sun.reflect.GeneratedMethodAccessor2933.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.appiancorp.kougar.services.KougarServiceInvocationHandler$JavaInvocationHandler.invoke(KougarServiceInvocationHandler.java:106) at com.appiancorp.kougar.services.KougarServiceInvocationHandler$KougarMethodInvocation.proceed(KougarServiceInvocationHandler.java:287) at com.appiancorp.security.authz.AuthorizationMethodInterceptor.invoke(AuthorizationMethodInterceptor.java:54) at com.appiancorp.kougar.services.KougarServiceInvocationHandler.invoke(KougarServiceInvocationHandler.java:324) at com.sun.proxy.$Proxy27.initiateProcessWithFullResult(Unknown Source) at com.appiancorp.process.runtime.activities.StartProcessSmartService2.run(StartProcessSmartService2.java:99) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:129) 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-11-11 09:20:28,224 [Appian Work Item - 872416 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268444294, classname=com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP 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: Session.connect: java.net.SocketException: Connection timed out (Read failed)] at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145) at com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP.createException(GetRemoteDirectoryContentsOverSFTP.java:203) at com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP.run(GetRemoteDirectoryContentsOverSFTP.java:70) 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:113) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.process(UnattendedJavaActivityRequest.java:41) at com.appiancorp.process.engine.ProcessEngineServiceImpl.processUnattendedRequest(ProcessEngineServiceImpl.java:162) at com.appiancorp.process.engine.ProcessEngineServiceImpl.processToNextAttended(ProcessEngineServiceImpl.java:228) at sun.reflect.GeneratedMethodAccessor2934.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.appiancorp.util.MethodInvocationReflectionImpl.proceed(MethodInvocationReflectionImpl.java:23) at com.appiancorp.security.authz.AuthorizationMethodInterceptor.invoke(AuthorizationMethodInterceptor.java:54) at com.appiancorp.services.ServiceManager$ServiceInvocationHandler.invoke(ServiceManager.java:479) at com.sun.proxy.$Proxy298.processToNextAttended(Unknown Source) at com.appiancorp.process.design.service.ProcessDesignServiceXmlImpl.initiateProcess(ProcessDesignServiceXmlImpl.java:1052) at com.appiancorp.process.design.service.ExtendedProcessDesignServiceJavaImpl.initiateProcessWithFullResult(ExtendedProcessDesignServiceJavaImpl.java:390) at sun.reflect.GeneratedMethodAccessor2933.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.appiancorp.kougar.services.KougarServiceInvocationHandler$JavaInvocationHandler.invoke(KougarServiceInvocationHandler.java:106) at com.appiancorp.kougar.services.KougarServiceInvocationHandler$KougarMethodInvocation.proceed(KougarServiceInvocationHandler.java:287) at com.appiancorp.security.authz.AuthorizationMethodInterceptor.invoke(AuthorizationMethodInterceptor.java:54) at com.appiancorp.kougar.services.KougarServiceInvocationHandler.invoke(KougarServiceInvocationHandler.java:324) at com.sun.proxy.$Proxy27.initiateProcessWithFullResult(Unknown Source) at com.appiancorp.process.runtime.activities.StartProcessSmartService2.run(StartProcessSmartService2.java:99) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:129) 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: Session.connect: java.net.SocketException: Connection timed out (Read failed) at com.jcraft.jsch.Session.connect(Session.java:565) at com.jcraft.jsch.Session.connect(Session.java:183) at com.appian.ps.plugins.sftpsmartservices.SFTPConfig.connect(SFTPConfig.java:178) at com.appian.ps.plugins.sftpsmartservices.GetRemoteDirectoryContentsOverSFTP.run(GetRemoteDirectoryContentsOverSFTP.java:65) ... 51 more
Any ideas about this issue?
Hi, Can you please elaborate a little Before the 7-8th document everything works fine, but after this, it starts to throw a timeout exception, so it will help us identify the root cause?
The configurations of the node how the instances are triggered (MNI or default), are you trying with a combination of getting directory contents followed by receive file over sftp, The above information will help us to replicate and identify a fix for the issue
From the error, we can see the issue is related to connectivity the Client is unable to read the entire contents before the timeout is configured. From a code perspective no upper bound time limit is specified for connection and for each instance of the above operation we are closing the channel
I am trying to send document using 'Send File Over SFTP' but receiving below error:
2021-12-07 13:26:29,772 [Appian Work Item - 54497 - execution00 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP - Error connecting to remote SFTP servercom.jcraft.jsch.JSchException: java.net.UnknownHostException: https://host.com at com.jcraft.jsch.Util.createSocket(Util.java:349) at com.jcraft.jsch.Session.connect(Session.java:215) at com.jcraft.jsch.Session.connect(Session.java:183) at com.appian.ps.plugins.sftpsmartservices.SFTPConfig.connect(SFTPConfig.java:178) at com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP.run(SendFileOverSFTP.java:140) 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: java.net.UnknownHostException: https://host.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.VPNSocketImpl.connect(VPNSocketImpl.java:50) at java.net.Socket.connect(Socket.java:607) at java.net.Socket.connect(Socket.java:556) at java.net.Socket.<init>(Socket.java:452) at java.net.Socket.<init>(Socket.java:229) at com.jcraft.jsch.Util.createSocket(Util.java:343) ... 23 more2021-12-07 13:26:29,773 [Appian Work Item - 54497 - execution00 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP - Error transferring file to SFTP serverjava.lang.NullPointerException at com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP.run(SendFileOverSFTP.java:149) 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)
Has anyone faced similar issues? Please let me know if you have any inputs on this.
Hi From the Error Log ,we can see that the server is trying to connect to https://host.com which is not resolvable from your machines network resulting in a unknown host exception .
Please try checking the same from your side