- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
configuring listSftp processor with keyfile
- Labels:
-
Apache NiFi
Created on ‎03-23-2017 08:42 AM - edited ‎08-18-2019 03:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a flow getting files from a sftp site, i am not shure what i am during wrong configuring the listSftp processor
I this flow ( just startet ) and keep getting this error
My configuration in listSftp is current
I have validated that the file exits on the nifi server in my directory, even tried to chmod 777 so everybody can do everything on it. ( i did this just for debug purpose )
I have this sence that i am during something basiclly wrong.
I have keyfile, hostname, username, a password (key phrase i thing ) there are 100 chars
I thing it is strange that nifi cannot validate that the file exits in /home/230960adm/ on the nifi server
Any suggestions ?
Created ‎03-23-2017 01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "Host Key File" property is used to specify the file containing your trusted hosts (commonly named known_hosts and found by default in the .ssh directory). It is not the key you are using to connect with. This property works in conjunction with the "Strict Host Key Checking" property when it is set to "true"
You are getting a key does not exist because this property ins un related to "Private Key Path" so NiFi is looking in its base default directory for this file.
I believe what you are trying to do has nothing to do with host key checking.
You want to configure the "Private Key Path" as the full path to your private key including the key name itself.
Thank you,
Matt
Created ‎03-23-2017 01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "Host Key File" property is used to specify the file containing your trusted hosts (commonly named known_hosts and found by default in the .ssh directory). It is not the key you are using to connect with. This property works in conjunction with the "Strict Host Key Checking" property when it is set to "true"
You are getting a key does not exist because this property ins un related to "Private Key Path" so NiFi is looking in its base default directory for this file.
I believe what you are trying to do has nothing to do with host key checking.
You want to configure the "Private Key Path" as the full path to your private key including the key name itself.
Thank you,
Matt
Created ‎03-29-2017 06:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply, i found out that i also have a firewall issue, so i cannot test it before this is solved.
Created ‎04-25-2017 07:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have also tried test from commandline
[root@sktudv01hdf01 ~]# sftp -o "IdentityFile=/etc/nifi-resources/keys/private_key_DWU_20140909.ppk" -oPort=2222 wftpb086@147.29.151.71 ssh: connect to host 147.29.151.71 port 2222: Connection timed out Couldn't read packet: Connection reset by peer
Created on ‎04-25-2017 02:16 PM - edited ‎08-18-2019 03:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello i keep getting this error ¨: my network says that firewall is open
2017-04-25 06:23:24,393 INFO [Clustering Tasks Thread-3] o.a.n.c.c.ClusterProtocolHeartbeater Heartbeat created at 2017-04-25 06:23:24,255 and sent to sktudv01hdf01.ccta.dk:9088 at 2017-04-25 06:23:24,393; send took 137 millis 2017-04-25 06:23:25,311 ERROR [Timer-Driven Process Thread-4] o.a.nifi.processors.standard.ListSFTP ListSFTP[id=fa15a338-015a-1000-ffff-ffffbc360c33] Failed to perform listing on remote host due to java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: timeout: socket is not established 2017-04-25 06:23:25,312 ERROR [Timer-Driven Process Thread-4] o.a.nifi.processors.standard.ListSFTP java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: timeout: socket is not established at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:447) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.processors.standard.util.SFTPTransfer.getListing(SFTPTransfer.java:184) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.processors.standard.util.SFTPTransfer.getListing(SFTPTransfer.java:148) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.processors.standard.ListFileTransfer.performListing(ListFileTransfer.java:103) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.processors.standard.AbstractListProcessor.onTrigger(AbstractListProcessor.java:341) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) [nifi-framework-core-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_77] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_77] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77] Caused by: com.jcraft.jsch.JSchException: timeout: socket is not established at com.jcraft.jsch.Util.createSocket(Util.java:394) ~[jsch-0.1.54.jar:na] at com.jcraft.jsch.Session.connect(Session.java:215) ~[jsch-0.1.54.jar:na] at com.jcraft.jsch.Session.connect(Session.java:183) ~[jsch-0.1.54.jar:na] at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:433) ~[nifi-standard-processors-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] ... 16 common frames omitted 2017-04-25 06:23:28,831 INFO [Heartbeat Monitor Thread-1] o.a.n.c.c.h.AbstractHeartbeatMonitor Finished processing 1 heartbeats in 2110 nanos
My listSftp configuration are as following
the Private Key Path file exits the full name is
[w20960adm@sktudv01hdf01 nifi]$ ls -l /etc/nifi-resources/keys/private_key_DWU_20140909.ppk -rwxrwx--- 1 nifi root 1459 Mar 23 13:23 /etc/nifi-resources/keys/private_key_DWU_20140909.ppk [w20960adm@sktudv01hdf01 nifi]$
Created ‎04-25-2017 05:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted answer to above question here:
