SAP PO 7.4
SFTP Version
Adapter Type: SFTP http://sap.com/xi/XI/SFTP SFTP ADAPTER 1.0
1000.1.0.4.21.20160706043300
Problem Overview
/Demo/ does not exist
We migrated an interface from SAP PI 7.11 to SAP PO 7.4 and saw issues with the implementation of the Advanced Mode Parameter (connection.mode.permanent). SAP SFTP component is not able to find Target SFTP Directory but with a “Catch”, continue to read on… The issue is with SAP support under “Very High” priority since June 2016. The Scenario requires us to transmit 1000s of files to print vendors. Receiving end is a CrushFTP’s (http://www.crushftp.com/index.html) SFTP site with username-password authentication enabled.
Filename: %FileName%
Filepath: ~/Demo
Maximum concurrency: 30
Additional Parameters: connection.mode.permanent is set to “True”
The reason for setting the above parameter to “True” is because (SAP note 2069078) as per the business process, we need to transmit 1000s of files during a set time frame. To do so, we enabled maximum concurrency so that file write processing can happen in parallel. The advance mode parameter is set to “True” so that we do not overflow the maximum number of allowed active connections. If set to “False”, we will hit the SFTP server active connection threshold value and connection will be reset per below error and the most critical file transfer process will be halted.
Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: com.jcraft.jsch.JSchException: Session.connect: java.net.SocketException: Connection reset
However, if we choose to enable the connection.mode.permanent parameter the SFTP adapter will find the receiver end directory BUT only for the first single run of this interface. Next time, when the interface will run it will dump the error “directory does not exist”.
Analysis
After a very detailed analysis and applying multiple fixes suggested by SAP support, the issue remains unaddressed.
SAP note :1737547
SAP note :1859563
‘trackCacheUpdateXML’
SAP SFTP team is now working on this “very high” priority issue to isolate the problem with SFTP Adapter, Advanced Mode Parameter (connection.mode.permanent) implementation, SAP note 2069078.
Workaround
We scheduled the affected channel to automatically stop/start once before the actual run of the scenario “interface” as we mentioned the transmission is fine in its first single run. So, every day we restart the channel as a temporary Band-Aid to work around this issue.
Conclusion
This blog will be updated with what fix we receive from SAP so that the other customers do not have to reinvent the wheel on a similar issue.
Solution
This issue has been resolved by code changes to SAP SFTP adapter under SAP Note 2401292
2401292 – SFTP target directory not found when permanent connection mode is used
An advanced mode parameter ‘check.resource.int’ has been introduced. After setting the parameter ‘check.resource.int’ with value ‘true’, an additional check will be performed to ensure the existence of the directory. The default value for the parameter ‘check.resource.int’ is false.
To get this correction available in your Support package you need to apply the patch matching to your support package version as per the instructions in the NetWeaver Support Package Stack guide which can be found on the SAP Service Marketplace as described in SAP Note 952402.
Originally Shared at:
https://blogs.sap.com/2016/08/31/advanced-mode-parameter-connectionmodepermanent-issue-with-sap-sftp/
Do you want to
learn more about integration?
We are dedicated to make our knowledge accessible. You can either figure it out by yourself or you can let us give you a hand.
Let us take care of your integration.
We are SAP Certified and we can make your project happen. Explore our services and contact us. We will be happy to take on your project.
View Our Services