BusinessConnect is not retrying after failing to send a file to a trading partner's SFTP server

BusinessConnect is not retrying after failing to send a file to a trading partner's SFTP server

book

Article ID: KB0078306

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect 6.X

Description

When sending a file to a trading partner via SFTP in BusinessConnect, and the retry configuration setting in the trading partner transport is set to retry 3 times with 60 seconds interval, BusinessConnect is not performing retries as intended.
From the audit logs :
<<<
PENDING     RECEIVED_FROM_PP     Received request from private process over JMS
PENDING     PACKAGE_MSG                Message packaged
PENDING     REQUEST_TO_TP            Sending request to trading partner
ERROR         RECEIVED_FROM_TP     Received error from trading partner: Message: SSH Exception: Connection lost
>>>

From the interior server logs :
<<<
<<<
...
BW.BusinessConnect-Interior_Server Error [bw.logger] BW-EXT-LOG-100000 Job-18043.18043 SshMgr: Unexpected Signal from Peer: SSH_FX_CONNECTION_LOST. Connection is lost for session: 7Z:19:F5:C9:XA:7E:8E:BA:B2:D2:C2:84:B6:E0:5D:23:9:B4:C4:3C
... 
>>>

From trading partner configuration:
<<<
Retry Count : 3
Retry Interval :60 seconds
>>>

Issue/Introduction

If the SFTP connection is aborted after handshake completion, then retry will not happen.

Environment

Linux environment

Resolution

The key in verifying if the retry will happen or not is:
-  If the SFTP handshake has NOT happened, then retry will happen
-  If the handshake has started and aborted for some reason, then the retry will not happen

From the Interior log entry cited above, the trading partner server was aborting the connection every few minutes.  In this case, BusinessConnect has already completed the handshake with trading partner SFTP server once, so if the connection aborts every few minutes, the the retry will not happen.

If customers would like to have a retry occur, you can implement a custom SFTP script to control the connection.  The SFTP script can be set up to do retries.   See the example SFTP script in the $BC_HOME/samples/bc/sshftpscripts directory in your BC installation for details.

Additional Information

BusinessConnect, Retry, SSHMgr, Connection