App Connect

 View Only

 SFTP not retrieving file

John Hawkins's profile image
John Hawkins IBM Champion posted Fri August 29, 2025 12:06 PM

Hi folks,

I suspect this is a dumb one - so, please forgive me now !

I've got a fileinput (and fileread also fails) that is attempting to SFTP read.

I have put on service trace and can see that it connects to the remote server and reads the directory (SFTPService.getDirectoryList) and indeed lists the files I want and returns with it in the list.

It then closes the connection - but no file.

} RemoteFileManager.doRemoteTransfer (000016F4-68B1CC17-00000004) , '[[SftpFileManager]Service: [[SFTPService]Server: <servername redacted by me> port: 22 user: Auser  pw: ****** directory: / status: CLOSED connected: false] regex: payload\.txt]'

I have my file in that dir called "payload.txt". and that appears to be what the regex was that it was looking for. (I've tried various "" ".*" etc.)

It then seems to look at the local file system for the same file.

com.ibm.broker.nodes.filenodes.FileReadContext@-3553657.findLocalFile - which returns false.

Then it just goes out of the nofile terminal.

Any clues as to why it's not picking up the file from the SFTP site??

I have connected using the same user/passwd in WINSCP and all is well - I can read and copy the file to my local system.

many thanks for any help !!

John.

Matthias Blomme's profile image
Matthias Blomme IBM Champion

Hi John
No dumb questions here. 

Well, when ACE downloads a file from a remote location, it stores it to the local system first. That is what the local input directory is for. First things first, does your ACE setup have write access to that local directory? Or is there anything else that listens to that same local dir?

John Hawkins's profile image
John Hawkins IBM Champion

Hey Matthias,

We raised a PMR and eventually got to the bottom of this (sorry for not updating !)

Turns out that this is an issue with the FTP library - the file was being returned marked as "OBJECT" - and not "FILE" in the response from the ls that's done on the server. I don't understand if this is a problem with the library or the FTP server - I suspect the server.

However..the library was ignoring this "OBJECT". There is a flag - 

MQSI_SFTP_DEPRECATED_PARSE_LS_ENTRIES: '1'

setting this in server.conf (or any one of the various places that you can set env vars in ACE) worked and the lib recognises type "OBJECT" as "FILE" :-)

thanks folks,

john