I responded to Russel’s question. Clearly, he never saw it. Is there something 
wrong with my email that my contributions are not getting through?

“Hi Russell,

To set that variable up as a system environment variable requires the installer 
to do something, like add the export command to a file such as 
“/etc/environment”. That is what we do on our current project, and I can see it 
happening in an Ansible task.

An out of the box installation will not create a system environment variable. 
Instead, it is created for the NiFi session by having nifi.sh call nifi-env.sh. 
Nifi.sh assumes that nifi-env.sh will be located in the same directory it is 
located in. This is of course circular, so at some point you need a systemd 
service or init script to be told where nifi.sh is located. Handily, if you run 
“nifi.sh install” this will install an init script in /etc/init.d for you that 
includes the location of the NiFi home and bin directories.

TL,DR; when you install NiFi, at some point you need to run “nifi.sh install” 
which will ensure a definition of NIFI_HOME exists within the context of the 
NiFi session. A system wide definition of NIFI_HOME is down to the installer 
themselves.”

Regards

Steve Hindmarch

From: Chris Debevec <christopherdebe...@gmail.com>
Sent: Wednesday, June 12, 2024 5:09 PM
To: users@nifi.apache.org
Subject: Re: Who or what sets up NIFI_HOME as a system environment variable?

You don't often get email from 
christopherdebe...@gmail.com<mailto:christopherdebe...@gmail.com>. Learn why 
this is important<https://aka.ms/LearnAboutSenderIdentification>
What do you mean who or what? If I follow your question my understanding is 
that's a normal sys admin function. It's the responsibility of whoever is 
administering the system and expected to keep the application up. Essentially a 
requirement while someone is installing or maintaining NiFi on the system. Must 
like any other application that might depend on a system variable much like 
JAVA_HOME

On Wed, Jun 12, 2024 at 10:39 AM Russell Bateman 
<r...@windofkeltia.com<mailto:r...@windofkeltia.com>> wrote:
I have an update on this question which remained quite rightly unanswered since 
it was my own peculiar problem.

It resulted from the not-so-clever way our NiFi systemd service was put 
together 6+ years ago which was avoided using nifi.sh (and nifi-env.sh). 
NIFI_HOME simply did not exist once NiFi was launched.

In the much more recent Docker container instance as well as from the 
development host command line directly (nifi.sh), NIFI_HOME is present.

On 6/7/24 15:46, Russell Bateman wrote:
It's hard for me to determine this for customers who may already have installed 
Apache NiFi and just drop my NAR in or count on my Docker container. I'd like a 
clearer idea of who or what is responsible for that.

Reply via email to