[ 
https://issues.apache.org/jira/browse/NIFI-15683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18102462#comment-18102462
 ] 

ASF subversion and git services commented on NIFI-15683:
--------------------------------------------------------

Commit 429f9e7348bd7bdb10966a7ed4c389a63eae490b in nifi's branch 
refs/heads/main from Rakesh Kumar Singh
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=429f9e7348b ]

NIFI-15683 Added Move Confliction Resolution to FetchSFTP (#11281)

Co-authored-by: David Handermann <[email protected]>
Signed-off-by: David Handermann <[email protected]>

> "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: 0.5h
>  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