You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Samu <sa...@koivusolutions.com> on 2021/04/06 05:04:29 UTC
GetFTP Socket timeouts
I am using Nifi 1.13.1 and GetFTP gives me socket timeouts always, no matter
what are timeouts set in properties or what are the other processor
properties.I am able to use FTP programs and the same file can be retrieved
from the FTP server from the same machine where Nifi is running.The
exception in Nifi log is:When debugging the issue, I noticed that the file
is actually retrieved just fine from the FTP server before the line where
is called and where the timeout happens.Also, If I tweak the GetFTP
processor and change the class method and add just before the line it
starts to work and the reply is correctly read from the FTP server. Is
this a bug in GetFTP standard Nifi processor or am I doing somethign wrong?
--
Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/
Re: AW: GetFTP Socket timeouts
Posted by Samu <sa...@koivusolutions.com>.
Verified that the issue also exists with Nifi 1.13.2 version.
--
Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/
AW: GetFTP Socket timeouts
Posted by "Dobbernack, Harald (Key-Work)" <ha...@key-work.de>.
Please avoid using 1.13.1 (session handling broken) and use 1.13.2
(I have not read your entire post, just jumped at the version)
Von: Samu <sa...@koivusolutions.com>
Gesendet: Dienstag, 6. April 2021 07:04
An: users@nifi.apache.org
Betreff: GetFTP Socket timeouts
I am using Nifi 1.13.1 and GetFTP gives me socket timeouts always, no matter what are timeouts set in properties or what are the other processor properties. I am able to use FTP programs and the same file can be retrieved from the FTP server from the same machine where Nifi is running. The exception in Nifi log is:
2021-03-26 17:06:31,531 ERROR [Timer-Driven Process Thread-1] o.apache.nifi.processors.standard.GetFTP GetFTP[id=45735b20-0178-1000-4e62-056a0fd3223e] Unable to retrieve file /abcdef.csv due to java.net.SocketTimeoutException: Read timed out: java.net.SocketTimeoutException: Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read(BufferedReader.java:182)
at org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:58)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:321<ftp://FTP.java:321>)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:300<ftp://FTP.java:300>)
at org.apache.commons.net.ftp.FTP.getReply(FTP.java:732<ftp://FTP.java:732>)
at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1853)
at org.apache.nifi.processors.standard.util.FTPTransfer.getRemoteFile(FTPTransfer.java:344)
at org.apache.nifi.processors.standard.GetFileTransfer.onTrigger(GetFileTransfer.java:192)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:214)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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)
When debugging the issue, I noticed that the file is actually retrieved just fine from the FTP server before the line where
FTPClient.completePendingCommand
is called and where the timeout happens. Also, If I tweak the GetFTP processor and change the class
org.apache.nifi.processors.standard.util.FTPTransfer
method
getRemoteFile
and add
try{
in.close();
}catch(final IOException ioe){
//do nothing
}
just before the line
client.completePendingCommand();
it starts to work and the reply is correctly read from the FTP server. Is this a bug in GetFTP standard Nifi processor or am I doing somethign wrong?
________________________________
Sent from the Apache NiFi Users List mailing list archive<http://apache-nifi-users-list.2361937.n4.nabble.com/> at Nabble.com.
Harald Dobbernack
Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 | Karlsruhe | Germany | www.key-work.de<https://www.key-work.de> | Datenschutz<https://www.key-work.de/de/footer/datenschutz.html>
Fon: +49-721-78203-264 | E-Mail: harald.dobbernack@key-work.de
Key-Work Consulting GmbH, Karlsruhe, HRB 108695, HRG Mannheim
Gesch?ftsf?hrer: Andreas Stappert, Tobin Wotring