Nifi Configuration

Hello, i have problems starting nifi it gives me a 502 Bad Gateway and i saw that they are certificate problems. Could someone tell me how to set up these certificates? Thank you

Hello,
If you need to generate certificates take a look at Security — CogStack-Nifi latest documentation . You will need to edit the env files if you want to customize settings.

NiFi itself takes a bit of time to start, you may need to turn on full logs : NiFi — CogStack-Nifi latest documentation

Hello,
thanks for your reply, i generated the certificates using create-root-ca-cert.sh, do i need to generate others for nifi to work? i also turn on full logs. Could you please tell me all the steps to make cogstack work? thank u

Hello,

That’s perfectly fine, normally after generating create-root-ca-cert.sh you’d need to recreate opensearch certificates too (if you plan to use it) other Security — CogStack-Nifi latest documentation. . You can check the NiFi log and paste it here, you can execute something like : “docker logs -f --tail 1000 cogstack-nifi > my_log_file.txt” to capture the output easily.

Hello, thank you. I sent the logs, I’m waiting for an admin to validate my post, when I go to https:localhost:8443 it always gives me a 502 Bad Gateway

I’m a bit confused, I wanted to know something, I saw in the documentation a link to the Nifi site for configuring security, there are 2 ways: securing NiFi with provided certificates and securing Nifi with TLS Toolkit. if i use the first way i should generate the certificates using create_root_ca_cert.sh if i use the second way i should use the nifi_toolkit_security.sh script, which of the 2 should i use to make nifi work?

You would use create_root_ca_cert.sh first, after which you can use nifi_toolkit_security to re-generate the NiFi specific certs and config. I’ll make it more explicit in the docs as this part is covered in two separate sections.

1 Like

Thank you for your reply,
I started all over doing the 2 steps as you said, but it’s the same thing it always gives me 502 bad error and nifi is always restarting.
The nifi logs don’t show any errors, they just show the configurations it’s doing but it never starts the container, the nginx ones shows as error : **[error] 20#20: 24 connect() failed (113: No route to host) while connecting to upstream, client: …, server: nginx.local, request: “GET / HTTP/1.1”, upstream: …", host: “localhost:8443”.
I think its because nifi is always restarting and i don’t know why. I don’t know if the problem is related to the area because I’m in Italy.
I’m trying to do the thesis on this topic but I don’t know if it can work.

I fix the problem by finding that the server was out of memory, i reduce the configured JVM setting for the NiFi process in the nifi-bootsrap.conf file.

2 Likes