본문 바로가기

Study/Bigdata

NIFI could not load known_hosts 해결방법


NIFI에서 ListSFTP 또는 getSFTP를 사용할때 분명히 계정 주소, 포트 까지 잘썻는데 


could not load known_hosts 다음과 같은 오류를 내뿜을수 있습니다 


저는 제가 잘못쓴건줄 알았는데-, 결론은 리눅스에서 nifi가 동작하는 계정으로 ssh로 한번 접속해주신다음 해주시면 되십니다


다음내용은 관련 포럼에 있는 내용입니다


https://community.cloudera.com/t5/Support-Questions/Using-ListSFTP-results-in-an-exception-Failed-to-obtain/td-p/219081


Re: Using ListSFTP results in an exception: Failed to obtain connection to remote host due to com.jcraft.jsch.JSCHException: Session.connect: java.net.SocketException: Connection reset: {}
 

 
 
 
Super Collaborator

Hi @Mayan Nath,

Can you please ensure to set "Strict Host Key Checking to False "

and also remove the known_hosts entries for the target host (under the directory ~/.ssh/knon_hosts or nifi user)

the best thing is to do the sftp manually from the command line and test once thats working incorporate to the NiFi cluster.( please ensure that you have performed the same across all he hosts)

Hope this helps !!