[ 
https://issues.apache.org/jira/browse/NIFI-15683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh Kumar Singh reassigned NIFI-15683:
-----------------------------------------

    Assignee: Rakesh Kumar Singh

> "Moving" SFTP files via rename command fails on some servers
> ------------------------------------------------------------
>
>                 Key: NIFI-15683
>                 URL: https://issues.apache.org/jira/browse/NIFI-15683
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 2.7.0
>         Environment: All
>            Reporter: Craig Patrick
>            Assignee: Rakesh Kumar Singh
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When running a FetchSFTP processor with the completion strategy set to 
> "Move", in certain servers an error is thrown:
> {code:java}
> FetchSFTP[id=8561c4bf-d472-3c0e-3eb5-25b311c85b79] Successfully fetched the 
> content for FlowFile[REDACTED] from [REDACTED] but failed to rename the 
> remote file due to Failed to rename [REDACTED] to [REDACTED]: 
> java.io.IOException: Failed to rename [REDACTED] to [REDACTED] - Caused by: 
> SFTP error (SSH_FX_FAILURE): Failure {code}
> Looking into it, this can be an issue when running in the standard OpenSSH 
> client and server as it throws it as a specific error. The only way around 
> this is to perform a 2 step strategy of remove and rename. The processor 
> should be updated for the "Move" completion strategy to take this into 
> account and instead of performing a rename command, should delete the 
> original and rename the current file, or should have options for replacement 
> strategy similar to other processors where the file can be renamed if exists 
> or ignored if exists - this would remove the errors and allow more 
> flexibility.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to