I am trying to create a workflow where I need to upload a file to SFTP server. The SSH connection node connects successfully. The node I add after SSH Connection, such as List Remote files node/ Upload or Download node, I am getting the following error:
Any help would be appreciated.
when you say connects successfully you probably used ‘test connection’ in the node dialog? If not, please try that one first. The connection nodes usually execute even though a setting might be wrong. This is due to the fact, that these nodes simply provide the connection information without actually connecting.
If that works, could you please send us your log file? Either click in your AP on View -> Open KNIME log and copy it, or go your KNIME workspace -> .metadata -> knime and copy your knime.log
Apologize for the late response. Please find the Knime Log of my workflow attached.
Knime Log.txt (263.4 KB)
I’ve had a look into the log file and it seems that there is a problem concerning the connection.
- When opening the dialog of your SSH Connection node and click on the button ‘Test connection’ does the connection succeed or fail? If it fails there might be a problem with the credentials, the port or something else concerning the server (encryption etc).
- Do you use the nodes in a loop?
- Please check if you have installed the KNIME File Handling Nodes, for that go to File -> Install KNIME Extensions… -> KNIME & Extensions -> KNIME File Handling Nodes (if it’s not there it’s already installed). Please check this even though you have File Handling nodes as there might be a problem with dependencies.
do you know what kind of encryption the SSH server uses? This could be a problem as the library we are using may not support it.
I don’t have that information. Is there any other way I can connect to a SFTP server and upload or download the file?
I have a similar problem using the following trio of nodes:
- SSH connection
- List remote files
- Download/upload files from list
SSH connection gives the a green light. Same for List remote files with is also green and output the correct list of files.
I want to download locally the files and thus create a local directory and use it as target of the Download/Upload files from list
The problem is that I get the following error message, whatever directory I specify.
WARN Download / Upload from List 5:19 Transfer from ssh://firstname.lastname@example.org:22/TEST/RETURN/test.txt to file:/C:/temp/knime_temp/ failed: C:\temp\knime_temp (Accès refusé)
Any idea of what could be the problem?
Hi @szawadski -
I think the problem is because you are trying to pass a directory as the URI you want to write to. Instead, you should pass a URI for each individual file. I did this by using a String Manipulation node to cobble together an appropriate filepath as shown below. This is a bit messy but hopefully you get the idea.
SSHDownloadFilesFromListExample.knwf (35.0 KB)