Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

exposing a nifi property as env variable

avatar
Expert Contributor

Is this the correct way of exposing a nifi property as env variable(in start.sh):

 

prop_replace 'nifi.web.http.port'      "${NIFI_WEB_HTTP_PORT:-8080}"

 I expect it to expose nifi.web.http.port as NIFI_WEB_HTTP_PORT, and also setting it to default value of 8080.

1 REPLY 1

avatar
Master Mentor

@manishg 

I am not clear on what you are trying to accomplish here. 
What is the use case?
What is your NiFi version?
What is your OS?

NiFi does not have a "start.sh" script.  Are you talking about the "nifi.sh" script.

Perhaps there are just some important details I am missing here.
also not sure why you would want to change the nifi..web.http.port configuration property in the nifi.properties file to a variable.  These properties are all read during startup of NiFi and evaluating NiFi variables is does not happen during NiFi startup.  Nor does NiFi support defining NiFi variables in the nifi.properties file.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt