Support Questions

Find answers, ask questions, and share your expertise

Nifi starts without error but cannot connect

avatar
Contributor

Hi

 

I am very new to nifi and try to install and configure the system.

 

I started nifi.sh start and it shows 

 

Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home

NiFi home: /Users/daniel/Downloads/nifi-1.15.3

 

Bootstrap Config File: /Users/daniel/Downloads/nifi-1.15.3/conf/bootstrap.conf

 

And when i enter nifi.sh  status, terminal shows:

 

2022-02-26 09:31:33,238 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi is currently running, listening to Bootstrap on port 52929, PID=74313

 

I changed nifi.web.http.port in nifi.properties to 8080.

 

But still I do not see any on localhost:8080.

 

In the log file there is no message that server has started on 8080 port.

 

I have no idea what problem caused the issue.

 

Please advise me.

 

Thanks

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi @CookieCream ,

 

I think I have a good idea of what's going on. The bootstrap.log, which you shared in pvt, has an error message complaining about a invalid key size. When I saw that I checked again your Java version and realized that you're using a very old Java version (1.8.0_65). In this version of Java, cryptographic key sizes were limited and you could not create long keys. Because of that, NiFi fails to create the TLS keys when it starts. To enable that in your Java version, you would have to download the Java Cryptography Extension (JCE) Unlimited Strength policies and copy them to your Java home manually to allow AES keys of size 256 and larger. These policies were only included by default in the JDK starting from update 1.8.0_162.

 

So, you have two options to make this work:

  • (Recommended) Upgrade your JDK to the latest Java 1.8 or, preferrably, to Java 11 (do not use versions higher than 11 because they are not supported by NiFi)
  • Alternatively, you can download the Java Cryptography Extension (JCE) Unlimited Strength, unzip it and follow the steps in the README.TXT to install it.

Once you do one of the above, clean up the directories of your previous attempts and try again with the steps that I copied below:

wget "https://downloads.apache.org/nifi/1.15.3/nifi-1.15.3-bin.tar.gz" -P .
tar -zxvf ./nifi-1.15.3-bin.tar.gz
cd nifi-1.15.3
./bin/nifi.sh set-single-user-credentials admin supersecret1
./bin/nifi.sh start

 

Please let us know if it works this time 😉

 

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

25 REPLIES 25

avatar
Contributor

@araujo 

Thank you so much!!

 

Your answers have been incredibly helpful!! 👍

avatar
Expert Contributor

Here's your actual error:

2022-02-27 23:08:20,716 WARN [main] o.a.nifi.security.util.SslContextFactory Some truststore properties are populated (./conf/truststore.p12, ********, PKCS12) but not valid
2022-02-27 23:08:20,717 ERROR [main] o.apache.nifi.controller.FlowController Unable to start the flow controller because the TLS configuration was invalid: The truststore properties are not valid

 

Ensure that you have generated certificates (SSL in your case, i assume). Add them to the truststore.jks of your Nifi instance (default location: ./conf/). Also, ensure the truststore and keystore properties in nifi.properties is accurately updated. 

 

This should help i guess.

 

Thanks

snm1523

avatar
Contributor

Hi @snm1523 

 

Thanks for the reply.

Could you tell me in more detail how to get the generated certificates? and I do not see truststore and keystone properties in nifi.properties. 

avatar
Expert Contributor

Hi @CookieCream,

 

Should guide you on how do we get certificates generated.

Apache NiFi Toolkit Guide

Once you have this followed and certs generated, you will have a new nifi.properties created that will include truststore and keystore related properties.

I have not tried anything on MacOS, but, I did saw there are some specific instructions for MacOS.

 

Have a look

 

Thanks

snm1523

avatar
Super Guru

@snm1523 ,

 

It should not be necessary to manually generate certificates. In the latest version, NiFi does that automatically when you start it for the first time.

 

Andre

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Expert Contributor

Thank you Andre. Wasn't aware. Actually I had used the steps mentioned in my reply during installation of Nifi. So thought might be useful in this case.

 

Thanks

Sunil