KB Article #178967
Connection to external SFTP server fail at SSH_FXP_STAT
Problem
-- Connection to external server fail after issuing SSH_FXP_STAT (seen after enabling debug for SimpleDebug)
2016-05-25 22:52:09,667 - DEBUG [Worker22-28] (SimpleDebug.getAbsolutePath:?) - getAbsolutePath SSH_FXP_REALPATH(16) path=[/] 2016-05-25 22:52:09,932 - DEBUG [Worker22-28] (SimpleDebug.getAttributes:?) - getAttributes SSH_FXP_STAT(17) path=[/] 2016-05-25 22:52:10,196 - ERROR [Worker22-28] (SftpClientImpl.goToDir:697) - com.maverick.sftp.SftpStatusException: No such file.: File not found com.maverick.sftp.SftpStatusException: No such file.: File not found at com.maverick.sftp.SftpSubsystemChannel.extractAttributes(Unknown Source) at com.maverick.sftp.SftpSubsystemChannel.getAttributes(Unknown Source) at com.sshtools.sftp.SftpClient.cd(Unknown Source) at com.cyclonecommerce.tradingengine.transport.sftp.SftpClientImpl.goToDir(SftpClientImpl.java:693) at com.cyclonecommerce.tradingengine.transport.sftp.SftpClientImpl.list(SftpClientImpl.java:749) at com.cyclonecommerce.tradingengine.transport.system.consumption.active.consumers.SftpConsumer.poll(SftpConsumer.java:96) at com.cyclonecommerce.tradingengine.transport.system.consumption.active.ExchangePointPoller.poll(ExchangePointPoller.java:71) at com.cyclonecommerce.tradingengine.transport.system.consumption.active.ExchangePointPoller.getNextPollResults(ExchangePointPoller.java:46) at com.cyclonecommerce.tradingengine.transport.system.consumption.active.ConsumptionManager.invoke(ConsumptionManager.java:75) at com.cyclonecommerce.tradingengine.transport.system.consumption.active.tasks.ConsumptionManagerTask.execute(ConsumptionManagerTask.java:66) at com.cyclonecommerce.util.task.TaskScheduler$WorkerThread.primRun(TaskScheduler.java:394) at com.axway.cluster.extensions.thread.EventedThread.run(EventedThread.java:80
-- Connection used to work with Interchange 5.10.0 or B2Bi 1.5.0
Resolution
**In 5.10.1 Sp13, 5.12.0 SP13, B2Bi 2.1.0 SP11, B2Bi 2.2.1 P4 and later two new tuning properties were added
The newly added tuning properties sftp.client.permitStatErrors and sftp.client.permitStatErrorsOperations may allow the client to work past some kinds of errors when getting directory attributes (SFTP STAT command). These errors may be caused by overly strict server rights and permissions. The following values are allowable settings for these two tuning properties:
sftp.client.permitStatErrors=permission, exists, all
sftp.client.permitStatErrorsOperations=navigation, read dir
Having appropriate server permissions is preferred, otherwise only enable the minimum permissions needed.
Below is an example on how these two new tuning properties can be used together:
sftp.client.permitStatErrors=permission
sftp.client.permitStatErrorsOperations=navigation
The above combination will try to ignore permission errors while navigating through directories.
Note that adding these new values to the tuning properties configuration file require a TE node restart.
** A third tuning property, "sftp.client.fallbackToDotForUserHome" had been added along with the above two. This tuning property can be used
to allow detection of the user home directory via REAL_PATH(".")
instead of REAL_PATH(""). By default, the value of this tuning property
is set to false. Only enable this property if needed, most SFTP servers
allow usage of REAL_PATH("") for user home directory. This third tuning property is not required to solve above problem.