RE: Sudo service nifi command not working

2019-10-17 Thread johannes.meixner
Moin,

service(8) often drops whatever environment variables are in the environment,
so you'll want to set that in nifi-env.sh instead.

Best
Johannes

-Original Message-
From: Bryan Bende  
Sent: Thursday, October 17, 2019 4:24 PM
To: users@nifi.apache.org
Subject: Re: Sudo service nifi command not working

It is best to email only one list, so dropping dev...

If you are starting the service with sudo then its the root user starting it, 
so you need to check if echo "$JAVA_HOME" works as root.

On Thu, Oct 17, 2019 at 10:19 AM Praveen Anguralia 
 wrote:
>
> Hi team,
>
> I need your inputs on an issue that I am facing with respect to the command:
> sudo service nifi start
> Background: I have installed Nifi in Amazon EC2 linux machine. I have 
> installed Java as well. When I run command as:
> ./nifi.sh start
> I do not find issue. Nifi starts successfully.
> But when I run command as:
>   sudo service nifi start
> It says JAVA_HOME not set.
> Its not able to find out java.
> Howveer, echo "$JAVA_HOME" gives the installed path
>
> Please help me to sort out the issue.
>
> Thank you,
> Praveen


Re: Sudo service nifi command not working

2019-10-17 Thread Bryan Bende
It is best to email only one list, so dropping dev...

If you are starting the service with sudo then its the root user
starting it, so you need to check if echo "$JAVA_HOME" works as root.

On Thu, Oct 17, 2019 at 10:19 AM Praveen Anguralia
 wrote:
>
> Hi team,
>
> I need your inputs on an issue that I am facing with respect to the command:
> sudo service nifi start
> Background: I have installed Nifi in Amazon EC2 linux machine. I have
> installed Java as well. When I run command as:
> ./nifi.sh start
> I do not find issue. Nifi starts successfully.
> But when I run command as:
>   sudo service nifi start
> It says JAVA_HOME not set.
> Its not able to find out java.
> Howveer, echo "$JAVA_HOME" gives the installed path
>
> Please help me to sort out the issue.
>
> Thank you,
> Praveen