Hi,
New to this list and loving NiFi so far ;-)
I have set up and been trying out with good results a NiFi set up locally on my 
laptop – all good. Managed to set up SSL configuration and hook up with company 
LDAP.

I have also set up three node cluster with cluster manager on a separate host, 
all using http – all good here too. NCM communicates fine with three nodes, and 
vice versa. Ok, moving on to set up cluster to use SSL and LDAP is where I have 
come a bit unstuck.

I am using self signed certificate – on laptop used one generated using 
openssl, then converted to pks file (which worked fine as above).

The issue I’m having is running virtually the same setup on cluster as laptop 
fails with the following exception (there is loads of other nested exception 
details) but it appears to boil down to this one.


Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'protocolSocketConfiguration': FactoryBean threw 
exception on object creation; nested exception is 
java.security.KeyStoreException:  not found
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
 ~[na:na]
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
 ~[na:na]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1517)
 ~[na:na]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:314)
 ~[na:na]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 ~[na:na]
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
 ~[na:na]
        ... 103 common frames omitted
Caused by: java.security.KeyStoreException:  not found
        at java.security.KeyStore.getInstance(KeyStore.java:851) ~[na:1.8.0_51]
        at 
org.apache.nifi.io.socket.SSLContextFactory.<init>(SSLContextFactory.java:72) 
~[na:na]
        at 
org.apache.nifi.cluster.protocol.spring.SocketConfigurationFactoryBean.getObject(SocketConfigurationFactoryBean.java:46)
 ~[na:na]
        at 
org.apache.nifi.cluster.protocol.spring.SocketConfigurationFactoryBean.getObject(SocketConfigurationFactoryBean.java:31)
 ~[na:na]
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
 ~[na:na]
        ... 108 common frames omitted
Caused by: java.security.NoSuchAlgorithmException:  KeyStore not available
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) 
~[na:1.8.0_51]
        at java.security.Security.getImpl(Security.java:695) ~[na:1.8.0_51]
        at java.security.KeyStore.getInstance(KeyStore.java:848) ~[na:1.8.0_51]



Having looked at the code, line 72 (&73) of SSLContextFactory is

final KeyStore trustStore = KeyStore.getInstance(truststoreType);
final FileInputStream trustStoreStream = new FileInputStream(truststore);

Which is throwing the error by the looks of it, so appears to need a value in 
the nifi.properties file for nifi.security.truststoreType= which on my laptop 
config is blank (docs seems to suggest that this is optional anyway), but the 
code complains about this not being present. If I enter a value (JKS or PKCS12) 
in here I get a filenotfound exception on line 73 instead as I haven’t provided 
a value for truststore location. So, do I need to provide truststore 
configuration in a clustered environment? If so, docs would helpful to point 
this out, if not anyone suggest something to fix this please? It took me 10 
mins to set up on laptop, now after 6 hours of trying on cluster I’m stumped.

Thanks
Conrad


SecureData, combating cyber threats
______________________________________________________________________ 
The information contained in this message or any of its attachments may be 
privileged and confidential and intended for the exclusive use of the intended 
recipient. If you are not the intended recipient any disclosure, reproduction, 
distribution or other dissemination or use of this communications is strictly 
prohibited. The views expressed in this email are those of the individual and 
not necessarily of SecureData Europe Ltd. Any prices quoted are only valid if 
followed up by a formal written quote.

SecureData Europe Limited. Registered in England & Wales 04365896. Registered 
Address: SecureData House, Hermitage Court, Hermitage Lane, Maidstone, Kent, 
ME16 9NT

Reply via email to