Skip to main content
manishg
Gold ⭐️
Sep 14, 2023 11:21 AM UTC
Solved

Nifi: file not picked from input directory after first ime

I have a nifi flow, working fine.  It picks file from a source directory, processes it, and file is deleted from source directory once picked up.

This all works fine first time. But later on, if I copy another file in source directory, that file is not picked up. I even stop all processors, clean any queue if not empty, and restart processors, but still file is not picked from input directory.

What causes this behaviour?

As a result, I have to stop-restart nifi, making it a bit cumbersome.

PS: Based on some google suggestions, I tried to delete flowfile_repository, but it doesn't allow so with message 'Device or resource busy'.

manishg
manishgAnswer
Gold ⭐️
Sep 14, 2023 11:41 AM UTC

Got the answer. First processor has listing strategy set to 'Tracking Timestamps', and copied file has older timestamp than the latest tracked one.

5 replies

manishg
manishgAuthorAnswer
Gold ⭐️
Sep 14, 2023 11:41 AM UTC

Got the answer. First processor has listing strategy set to 'Tracking Timestamps', and copied file has older timestamp than the latest tracked one.

Translate
MattWho
Titanium ⭐️⭐️
Titanium ⭐️⭐️
Sep 14, 2023 4:55 PM UTC

@manishg 
Copying a file should have resulted in a new timestamp making it newer than the last file you previously listed.  However, moving a file typically does not change timestamps on the file.  My guess here is you moved a file into the directory instead of copy?

Matt

Translate
manishg
manishgAuthor
Gold ⭐️
Sep 15, 2023 2:24 AM UTC

I used docker copy command.

Translate
gtorres
Silver ⭐️⭐️⭐️
Silver ⭐️⭐️⭐️
Sep 14, 2023 3:17 PM UTC

 What processors are you using? List or Get files?

Translate
manishg
manishgAuthor
Gold ⭐️
Sep 15, 2023 2:25 AM UTC

Its ListFile.

Translate