[ 
https://issues.apache.org/jira/browse/NIFI-9294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486145#comment-17486145
 ] 

Nathan Gough commented on NIFI-9294:
------------------------------------

As Wiktor states, you absolutely should never run NiFi as root. When you’re 
using sudo ./bin/NiFi.sh, this creates a new shell environment which probably 
does not have the same environment variables set as your ‘grivine’ user. So, 
you will not have JAVA_HOME set when running with sudo. If you had included -E, 
it would have preserved environment variables.

Basically, don't run NiFi as root user or with sudo, and you should not have 
this issue.

I'll close this ticket as it's an individual issue with machine configuration 
and not a NiFi bug. If you're still having the issue, feel free to ask for 
assistance on our Apache NiFi slack channel or the mail list 
us...@nifi.apache.org.

> nifi.sh: JAVA_HOME not set; results may vary
> --------------------------------------------
>
>                 Key: NIFI-9294
>                 URL: https://issues.apache.org/jira/browse/NIFI-9294
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Configuration, NiFi Registry, NiFi Stateless, Tools and 
> Build
>    Affects Versions: 1.14.0
>         Environment: Ubuntu 20.04
>            Reporter: Grivine Ochieng Otieno
>            Priority: Critical
>         Attachments: Screenshot from 2021-10-11 20-18-57.png, nifi-env.sh, 
> nifi.sh
>
>   Original Estimate: 60h
>  Remaining Estimate: 60h
>
> I cant start NiFi after installing and setting up path for java on my 
> computer. The message returned on the terminal is as shown in the image and 
> attachments. Please can anyone help me resolve the issue?
>  JAVA_HOME is set already. I tried editing the nifi_env.sh file but it 
> returned an error saying java path is invalid. I am stuck and cannot proceed.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to