When trying to use the SFTP:put service in my flow service with following input parameters ,
I am getting an error either access denied or pipe close or directory error .
Step 1: ERRORS
inputs are session key, Content stream (converting the EDI data(String) to stream and passing the value),remote file (remote location folder path)
Step 2: SUCCESS
inputs are session key , local file (writing my EDI data to local temp folder and using that path ),remote file (remote location folder path)
Access denied and directory errors seem to be design-time errors, while pipe closed is the runtime one.
Can you post the actual error messages in full, along with their respective stack traces?
If this is a remote folder wherein youâre creating a file directly, the error is straightforward to me. Can you check if the remote server/folder requires additional authorization or has streaming restrictions?
Your local put followed by a file transfer to the remote folder works, so the issue seems isolated to the remote location and thatâs where Iâd investigate.
Having said that, I recommend creating a local file, then transferring that file to the remote location and finally deleting the local copy if the transfer was successful. This helps in handling failure scenarios better in environments that are prone to disruptions, even though the mode parameter provides a resume option.
when using the step 2 it works fine. no issues only when i use the content stream option it throws access denied .
I also check on the permission level for each folder with the EDI partner all good.
yes , I will go with step 2 for now.
Option 1 should work, but I havenât tested it personally - do open a support ticket if you need further assistance. I prefer Option 2 when I design for a problematic environment.
When using a stream as input to the service, are you specifying a filename or just the folder path? If just the folder path, that is likely why it is failing. Trying to write the stream to the directory itself, not a file. When you specify a file as input, it will use the name of the file as the name of the remote file. From the docs: âIf you specify localFile , then remoteFile and contentStream are optional. In this case, the
remote file will be given the same name as the local file.â
Make sure the remoteFile string specifies a filename, not just the directory name. The â/in/EDI998â string you mention above looks like a dir name, not a complete filename.