Member since
02-08-2018
8
Posts
0
Kudos Received
0
Solutions
03-20-2018
07:05 AM
@Matt Clarke Thanks for reply. I have did what you have suggested. But even after that i was not able to route floe to not.found, it is still getting routed to comms.failure. My Requirement is i have download specific file from FTP and if that file not found it should get routed to not.found. Attache flow screenshot for reference.flow.png
... View more
03-16-2018
04:46 AM
@Matt Clarke Thanks for quick response. Below are answers for your queries. How is the data being written to the FTP server?
We
have created local FTP server using Filezilla on windows machine and accessing
this FTP from centos machine. Data is copy pasted by end user to shared folder. Is there maybe a lock file preventing the fetchFTP user from
being able to access/delete this file? If the file is still exists, is it successful if you try to
fetch files routed to comms.failure again?
There
is no lock on file; file can be accessed by anyone from anywhere. If file is
present on FTP server entire flow works perfectly fine including LogMessage and
PutEmail components. Do you confirm the file is really missing from the FTP server?
File is not missing but wrong named file is placed in folder. In case of no single file in folder nothing is happening. Are there multiple systems/nodes trying to pull this data? About system no, but for nodes it is possible
because our NiFi system is cluster of three nodes.
... View more
03-15-2018
12:41 PM
@Matt Clarke, Used the same, but fetchFTP is not rounting control to LogMessage. Below is some part of log file. 2018-03-15 08:38:58,951 ERROR [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.FetchFTP FetchFTP[id=28050d7f-0162-1000-ffff-ffff8f62fee5] Failed to fetch content for StandardFlowFileRecord[uuid=f138abe6-732d-471e-b931-0c15a64f9cb7,claim=,offset=0,name=6.csv,size=0] from filename data/ram.csv on remote host 172.27.15.28:21 due to java.io.IOException: 550 File not found
; routing to comms.failure: java.io.IOException: 550 File not found
java.io.IOException: 550 File not found
at org.apache.nifi.processors.standard.util.FTPTransfer.getInputStream(FTPTransfer.java:302)
at org.apache.nifi.processors.standard.FetchFileTransfer.onTrigger(FetchFileTransfer.java:238)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-03-15 08:38:59,253 INFO [Process Cluster Protocol Request-7] o.a.n.c.p.impl.SocketProtocolListener Finished processing request 6966e9f9-55da-4ec3-90d4-8a45c3bafacc (type=HEARTBEAT, length=2949 bytes) from 172.27.56.233:8070 in 0 millis
2018-03-15 08:38:59,253 INFO [Clustering Tasks Thread-1] o.a.n.c.c.ClusterProtocolHeartbeater Heartbeat created at 2018-03-15 08:38:59,252 and sent to 172.27.56.233:8020 at 2018-03-15 08:38:59,253; send took 1 millis
2018-03-15 08:38:59,364 INFO [Flow Service Tasks Thread-1] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController@6b484770 // Another save pending = false
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.c.s.StandardProcessScheduler Stopping PutFile[id=28063848-0162-1000-0000-00005863f5de]
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.controller.StandardProcessorNode Stopping processor: class org.apache.nifi.processors.standard.PutFile
2018-03-15 08:39:01,662 INFO [StandardProcessScheduler Thread-6] o.a.n.c.s.TimerDrivenSchedulingAgent Stopped scheduling PutFile[id=28063848-0162-1000-0000-00005863f5de] to run
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.c.s.StandardProcessScheduler Stopping LogMessage[id=0dfa30aa-65d8-1034-8f3b-fc27cc88c4bb]
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.controller.StandardProcessorNode Stopping processor: class org.apache.nifi.processors.standard.LogMessage
2018-03-15 08:39:01,662 INFO [StandardProcessScheduler Thread-1] o.a.n.c.s.TimerDrivenSchedulingAgent Stopped scheduling LogMessage[id=0dfa30aa-65d8-1034-8f3b-fc27cc88c4bb] to run
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.c.s.StandardProcessScheduler Stopping ListFTP[id=280441e3-0162-1000-ffff-ffffec729c2d]
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.controller.StandardProcessorNode Stopping processor: class org.apache.nifi.processors.standard.ListFTP
2018-03-15 08:39:01,662 INFO [StandardProcessScheduler Thread-7] o.a.n.c.s.TimerDrivenSchedulingAgent Stopped scheduling ListFTP[id=280441e3-0162-1000-ffff-ffffec729c2d] to run
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.c.s.StandardProcessScheduler Stopping FetchFTP[id=28050d7f-0162-1000-ffff-ffff8f62fee5]
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.controller.StandardProcessorNode Stopping processor: class org.apache.nifi.processors.standard.FetchFTP
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.c.s.StandardProcessScheduler Stopping LogMessage[id=08f9300f-a3fd-1126-a12b-b501583020d7]
2018-03-15 08:39:01,662 INFO [NiFi Web Server-1921] o.a.n.controller.StandardProcessorNode Stopping processor: class org.apache.nifi.processors.standard.LogMessage
2018-03-15 08:39:01,662 INFO [StandardProcessScheduler Thread-2] o.a.n.c.s.TimerDrivenSchedulingAgent Stopped scheduling FetchFTP[id=28050d7f-0162-1000-ffff-ffff8f62fee5] to run
2018-03-15 08:39:01,663 INFO [StandardProcessScheduler Thread-1] o.a.n.c.s.TimerDrivenSchedulingAgent Stopped scheduling LogMessage[id=08f9300f-a3fd-1126-a12b-b501583020d7] to run
2018-03-15 08:39:02,078 INFO [Flow Service Tasks Thread-1] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController@6b484770 // Another save pending = false
... View more
03-15-2018
12:24 PM
@Matt Clarke, Yes it is correct. But it not just limited to PutEmail, i should be able to write custom message to log file as well (not necessory saparate log file, standard log file will work too). Thanks
... View more
03-15-2018
12:02 PM
We are trying to build flow which will download csv file from FTP server and load it in database. While doing that we have to check for files existance in FTP server. To do so we have used ListFTP->FetchFTP and used connections of FectFTP for routing. Now if file is present on server, flow works correctly on success connection but in case of file not found it is terminating all other components by putting file not found exception at component and log file level. But we want to notify use by email or by saparate log file entry that system was not able to locate file. Please help us achieving this. I am using nifi 1.5
... View more
Labels:
- Labels:
-
Apache NiFi
02-09-2018
05:46 AM
Hello @Andrew Lim, Thanks for the solution
and the documentation you have created. It is really good help for people like
us who are new to NiFi horizon. I am now able to load template and test the
scenarios successfully.
... View more
02-08-2018
04:55 AM
I am not able to upload template updated here. I am getting error saying "Not a Valid format".
... View more