Support Questions

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

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