FTP Connection Issue

Getting an error on 4.2.1 trying to test or use an FTP connection:
DEBUG List Remote Files 6:2 Exception while trying to walk up the directory structure looking for the root.
DEBUG List Remote Files 6:2 reset
ERROR List Remote Files 6:2 Execute failed: /null: No such file or folder.

This happens when I use the test button on the FTP connection or on a List Remote Files node with the FTP connection connected to that node.

Should be reproduceable. The FTP site is: pubftp.spp.org. anonymous/anonymous.

Thank you for any help in advance.

Michael

Hi @txjmb -

Thanks for the bug report. Strange… this looks related to an issue with the FTP node that was fixed in 4.2, but I can reproduce the problem with the steps you describe here.

Let me see if I can get the attention of a developer to take a look at this more closely. Sorry for the trouble.

Many thanks. Let me know if you have any further questions.

Hi @txjmb -

Have you had a chance to try the new Transfer Files and FTP Connector nodes introduced with the File Handling Update in KNIME AP 4.3? I wonder if these would be an improvement for you.

1 Like

Not yet, but I will do that this week. Looking forward to trying them out, and I’ll report back here. Thank you!

Michael

2 Likes

I am unable to get the FTP connection to work with this ftp site. It errors out with “execute failed” and “failed to create FTP session”. I may be missing something, but I have tried anonymous authentication and anonymous/anonymous as username/password. Works with browser and multiple other FTP tools. Should be able to repro error since this is a public ftp site. Let me know if you have any ideas. Console log below:

DEBUG FTP Connector 5:11 FTP Connector 5:11 Start execute
WARN FTP Connector 5:11 Failed to create 1-th FTP session (0 sessions already opened). Please consider decreasing the maximum FTP sessions.
ERROR FTP Connector 5:11 Failed to initialize FTP client pool
DEBUG NodeContainer ROOT has new state: EXECUTING
DEBUG FTP Connector 5:11 reset
ERROR FTP Connector 5:11 Execute failed: anonymous@pubftp.spp.org
DEBUG FTP Connector 5:11 FTP Connector 5:11 doBeforePostExecution
DEBUG FTP Connector 5:11 FTP Connector 5:11 has new state: POSTEXECUTE
DEBUG FTP Connector 5:11 FTP Connector 5:11 doAfterExecute - failure

Hmmm. I run into the same problem that you do when trying to access pubftp.spp.org with the FTP Connector node.

If I try a different site, say ftp://speedtest.tele2.net, things seem to work OK. It’s not clear to me why one site works but the other doesn’t. Let me ask internally and see if what I can find out.

1 Like

Hello Scott… Any word on this? The ftp site is a fairly standard anonymous access site. Not sure why it doesn’t work.

I have more information on this issue. It appears, from a Wireshark trace, that there is a protocol violation from the server that is causing the Apache Commons library to throw an exception. The response from the server to the “STRU” FTP command is the issue. There is an additional newline character, probably contained in the server error message itself. Most clients ignore this issue, but Apache does not. This is actually a new issue with 4.3 Knime from what I can tell as the previous issue does appear to have been fixed in the new FTP Connector node. The previous issue is not fixed in the legacy node.

Here is the error in the Knime logs:

2021-02-09 12:04:06,018 : ERROR : KNIME-Worker-53-FTP Connector 0:12 :  : Node : FTP Connector : 0:12 : Execute failed: Truncated server reply: 
org.apache.commons.net.MalformedServerReplyException: Truncated server reply: 
	at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:331)
	at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:299)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:522)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:644)
	at org.apache.commons.net.ftp.FTP.type(FTP.java:1115)
	at org.apache.commons.net.ftp.FTPClient.setFileType(FTPClient.java:1556)
	at org.knime.ext.ftp.filehandling.fs.FtpClientFactory.createNativeClient(FtpClientFactory.java:155)
	at org.knime.ext.ftp.filehandling.fs.FtpClientFactory.createClient(FtpClientFactory.java:88)
	at org.knime.ext.ftp.filehandling.fs.ClientPool.createResource(ClientPool.java:332)
	at org.knime.ext.ftp.filehandling.fs.ClientPool.start(ClientPool.java:208)
	at org.knime.ext.ftp.filehandling.fs.FtpFileSystemProvider.<init>(FtpFileSystemProvider.java:95)
	at org.knime.ext.ftp.filehandling.fs.FtpFileSystem.createProvider(FtpFileSystem.java:97)
	at org.knime.ext.ftp.filehandling.fs.FtpFileSystem.<init>(FtpFileSystem.java:91)
	at org.knime.ext.ftp.filehandling.fs.FtpFSConnection.<init>(FtpFSConnection.java:75)
	at org.knime.ext.ftp.filehandling.node.FtpConnectorNodeModel.createConnection(FtpConnectorNodeModel.java:133)
	at org.knime.ext.ftp.filehandling.node.FtpConnectorNodeModel.execute(FtpConnectorNodeModel.java:115)
	at org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)
	at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1245)
	at org.knime.core.node.Node.execute(Node.java:1025)
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

I am working with the owner of the server to address the issue with the FTP server vendor, but in the meantime, if Knime does not need to use the STRU command, then removing it should fix the issue. See the network trace below, issue occurs (I believe) after the 202 message from the server:

220 EFT Login - Tuesday, 2/9/2021 11:33:30 AM - Please enter valid credentials to continue
USER anonymous
331 Password required for anonymous.
PASS
230 Login OK. Proceed.
MODE S
200 Mode set to S.
STRU F
202 Command not implemented, superfluous at this site.

TYPE I
200 Type set to I.
2 Likes

Hi @txjmb -

Thanks for the detailed feedback and troubleshooting on this issue. I’ve created a ticket for it in our system (AP-16215).

Sorry for the trouble!

2 Likes

Thank you for looking into it. I appreciate it very much.

1 Like

We’ve fixed this bug in the latest version of the nightly build, if you’d like to try that out. Otherwise, the fix will be available in the next version of KNIME to be released, which will be very soon now. :slight_smile:

2 Likes

Hello,
KNIME Analytics Platform 4.3.2 is now available which includes the fix for this problem.
Bye
Tobias

1 Like

A post was split to a new topic: FTP Connector not working after update to 4.3.2

I can confirm that this fixes the problem. Thank you!

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.