Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Why is NIFI Registry Sync to GIT failing

avatar
Rising Star

I've set up a nifi-registry.. and a GIT server to store my versioned flows in. I've changed my nifi-registry providers.xml to use a GIT flowPersistenceprovider

    <flowPersistenceProvider>
        <class>org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider</class>
        <property name="Flow Storage Directory">/var/lib/nifiregistry/git/eids-registry</property>
        <property name="Remote To Push">origin</property>
        <property name="Remote Access User">git</property>
        <property name="Remote Access Password">abc123</property>
    </flowPersistenceProvider>


I've also cloned the repository seen in the Flow Storage Directory property

[root@sensis-90076 conf]# cd /var/lib/nifiregistry/git/eids-registry/
[root@sensis-90076 eids-registry]# git status
# On branch master
nothing to commit, working directory clean
[root@sensis-90076 eids-registry]#


I see the following errors (tail -f nifi-registry-app.log) when I try to save a flow


2018-10-16 10:54:49,462 ERROR [GitFlowMetaData Push thread] o.a.n.r.p.flow.git.GitFlowMetaData Failed to push commits to origin due to org.eclipse.jgit.api.errors.TransportException: git@mali.corp.sensis.com:eids-registry.git: remote hung up unexpectedly
org.eclipse.jgit.api.errors.TransportException: git@mali.corp.sensis.com:eids-registry.git: remote hung up unexpectedly
        at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:180) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.apache.nifi.registry.provider.flow.git.GitFlowMetaData.lambda$startPushThread$1(GitFlowMetaData.java:220) ~[nifi-registry-framework-0.3.0.jar:0.3.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_181]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_181]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]
Caused by: org.eclipse.jgit.errors.TransportException: git@mali.corp.sensis.com:eids-registry.git: remote hung up unexpectedly
        at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:363) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:176) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.Transport.push(Transport.java:1344) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        ... 8 common frames omitted
Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://git@mali.corp.sensis.com:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host 'mali.corp.sensis.com' can't be established.
RSA key fingerprint is ac:77:d6:6b:28:5f:6c:70:b8:34:13:b1:4b:ec:ad:c0.
Are you sure you want to continue connecting?
        at org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider.get(UsernamePasswordCredentialsProvider.java:127) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.CredentialsProviderUserInfo.promptYesNo(CredentialsProviderUserInfo.java:137) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at com.jcraft.jsch.Session.checkHost(Session.java:793) ~[jsch-0.1.54.jar:na]
        at com.jcraft.jsch.Session.connect(Session.java:345) ~[jsch-0.1.54.jar:na]
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:136) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:140) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:338) ~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
        ... 12 common frames omitted


2 REPLIES 2

avatar
Rising Star

Follow up detail.. I have no problem doing a git push from the command line. This tells me that the failure is strictly within the nifi-registry.

[root@sensis-90076 eids-registry]# pwd
/var/lib/nifiregistry/git/eids-registry
[root@sensis-90076 eids-registry]# ls
FAA_Terminal_Procedures_Publications  hi
[root@sensis-90076 eids-registry]# git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:


  git config --global push.default matching


To squelch this message and adopt the new behavior now, use:


  git config --global push.default simple


See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)


git@mali.corp.sensis.com's password:
Counting objects: 34, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (30/30), 3.18 KiB | 0 bytes/s, done.
Total 30 (delta 12), reused 0 (delta 0)
To git@mali.corp.sensis.com:eids-registry.git
   35c4861..72fd26c  master -> master
[root@sensis-90076 eids-registry]#