Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Accessing the Linux server through Nifi (Linux)

avatar
Contributor

Good Morning

 

I'm trying to access an address of another Linux server through Nifi that is also installed on a Linux server, to search for files.

 

I'm trying to use the FetchFile Processor for this but I'm not getting the error "Routing to not found".

 

Could you help me how to make this connection between one server and another?

1 ACCEPTED SOLUTION

avatar
Super Mentor

@leandrolinof 
I see no reason why using UpdateAttribute to establish the needed path and filename values for FetchSFTP processor would not work.  FetchSFTP has no dependency on using ListSFTP.  ListSFP just serves as a mechanism for obtaining a list of Files from a target SFTp server and recording state.  ListSFTP simply creates a FlowFile with the needed attributes set for each File found on the target.  So if you have another method build that can get set those attributes, then you are good to go.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt



View solution in original post

5 REPLIES 5

avatar

@leandrolinof 

 

FetchFile is going to look for the file on the nifi node or nifi nodes where nifi is installed.  This is usually something done on the primary node of a multi node nifi cluster.

 

If you want to connect to another linux server, not part of the nifi cluster you will have to take a different approach.  One such approach could be using minifi, or possible ExecuteScript to run a linux command from nifi node to other linux server.

avatar
Super Mentor

@leandrolinof 
ListSFTP  and FetchSFTP are commonly used to fetch files from a remote server.  In order to use ListFile or FetchFile the location remote directory would need to be mounted as a local file directory.

Matt

avatar
Contributor

@MattWho 

 

I'm trying this way.

 

With an UpdateAttribute processor and right after FetchSFTP

 

leandrolinof_0-1664799037925.png

 

 

leandrolinof_1-1664799076897.png

 

I'm trying this way because I need to run Oracle QUERY previously and do some validations

 

Can it work?

avatar
Super Mentor

@leandrolinof 
I see no reason why using UpdateAttribute to establish the needed path and filename values for FetchSFTP processor would not work.  FetchSFTP has no dependency on using ListSFTP.  ListSFP just serves as a mechanism for obtaining a list of Files from a target SFTp server and recording state.  ListSFTP simply creates a FlowFile with the needed attributes set for each File found on the target.  So if you have another method build that can get set those attributes, then you are good to go.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt



avatar
Contributor

@MattWho 

 

Thank you very much, this worked perfectly for what I was needing.

 

Can you tell me if this same flow also works with windows?