Support Questions

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

Setup environment variables in NiFi cluster setup in openshift

avatar

This repo in github indicates that I can setup nifi docker to use environment variables.

https://github.com/apache/nifi/blob/master/nifi-docker/dockerhub/README.md

I have setup NIFI_ZK_CONNECT_STRING environment variable in openshift as shown in screenshot below.

start-script.png

environment-variable.png

This setup is however not working as the openshift pod for Nifi fails to start.

error.png

Does nifi.properties support environment variables? The GitHub code indicates it would, but below blog post says it would not.

https://community.hortonworks.com/questions/115297/does-nifiproperties-file-accept-env-variables.htm...

Can you please clarify is this is possible?

1 ACCEPTED SOLUTION

avatar
Super Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
5 REPLIES 5

avatar
Super Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar

@Harald Berghoff
It appears that the start.sh script had to be changed to Unix format. I thought about this late in the day today and that fixed the issue. The NiFi pod is now up and running in openshift with environment variables set-up for ZK connect string.

avatar

web tutorial in welookups.com

avatar
New Contributor

@Prachi Sharma Would you might sharing your findings on github. I am facing something similar issue.

avatar

@Dhwanil Raval

I was able to follow the github link I have posted above and setup environment variable in openshift and apply them in the script start.sh

The only thing I had to do is convert the script to the Unix format in my text editor as openshift was having trouble running it when deploying the pod and starting nifi.

If you are having a specific issue I could help with that but currently its all working as described in github.