The provided path does not exist - SFTP SSH connector Issue | Logic app SFTP SSH Error - provided path does not exist

{tocify} $title={Table of Contents}

Error/Issue:


In a workflow, there is an action to create a file on SFTP server using SFTP-SSH connector.

While  testing found that the files are getting written however the action gets failed with 404 status (Not Found)

And the error message says "The provided path (filename which is written) does not exist."


The provided path does not exist



After seeing the error, checked the folder where file was written and yes the  file with name which used to create a file  was not there instead name had timestamp added to it.


Why it happened

The destination system has a process which renames the files as soon as it is written to the SFTP server's folder.

But irrespective of whether the file is getting renamed or not, error doesn't make sense and the intended task of the SFTP-SSH (Create file action) of creating file is done successfully.

One of the reason is "Get All File Metadata" property. This property exists within the SFTP-SSH connector configuration itself (not within an action).

Get all file metadata

When enabled (default behavior), this  retrieves a  comprehensive set of metadata properties during actions like creating or modifying files.

But, here the destination system is renaming the file as soon as it is written, so when connector tries to fetch metadata of the file written (using the file name), it does not find it as it is renamed.

Another reason is "Allow Chunking" setting, which is enabled by default for Create File Action.

Allow Chunking

This allows the connector to break down large files (up to 1 GB for supported actions) into smaller chunks for efficient transfer over the network.

While chunking is automatic, you can configure a specific chunk size within a range of 5 MB to 50 MB.

Since the destination system is renaming the file as soon as it is written(first chunk), so when connector tries to add next chunk to the file written (using the file name), it does not find it as it is renamed.


What to do

We need to make sure that whatever action we need to perform while writing /creating the file should be done before the file is renamed.

Or

Disable the settings which might interfere or not let the SFTP connector Action complete in totality before file is renamed.

To make sure the above theory, did following test and captured the observation.


Allow Chunking

Get All File Metadata

Result/Observation

Yes

Yes

Error: The provided path ‘xxxx’ does not exist.

Yes

No

Error: The provided path ‘xxxx’ does not exist.

No

Yes

Error: The provided path ‘xxxx’ does not exist.

No

No

It works



In order to solve the issue, both Allow chunking and Get all file Metadata needs to be disabled.






إرسال تعليق

If you have any suggestions or questions or want to share something then please drop a comment

أحدث أقدم