You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Bryan Bende <bb...@gmail.com> on 2019/10/17 14:24:18 UTC

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
<pr...@gmail.com> 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

Posted by jo...@post.ch.
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 <bb...@gmail.com> 
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 <pr...@gmail.com> 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