Re: 0.7.0 install bug centos 7

2016-06-21 Thread Yolanda Davis
For those running this problem I've submitted a pull request for a
potential fix:

https://github.com/apache/nifi/pull/553/

One thing to note is with this fix I could not recreate the second
issue where the nifi service did not start on reboot of the machine.
In the PR I've added snapshots of my tests which used a centos 7 vm.
If anyone is interested in trying this out or providing input I would
appreciate it.

Thanks,

-yolanda


On Mon, Jun 20, 2016 at 7:01 PM, James Wing  wrote:

> Thanks for reporting this, Ryan, I see the same behavior.  I created a JIRA
> for this issue (https://issues.apache.org/jira/browse/NIFI-2063).  If you
> need a workaround, you can edit /etc/init.d/nifi to hard-code the path to
> the script directory:
>
> SCRIPT_DIR=/opt/nifi/current/bin
> SCRIPT_NAME=$(basename "$0")
> PROGNAME=nifi.sh
>
> . "$SCRIPT_DIR"/nifi-env.sh
>
> ...
>
> Thanks,
>
> James
>
> On Mon, Jun 20, 2016 at 2:33 PM, Ryan H 
> wrote:
>
> > Looks like 0.7.0 doesn't install as a service quite right on linux/centos
> > 7.
> >
> > I untar'd it in:
> >  #/opt/nifi/current -> nifi-0.7.0-SNAPSHOT
> >
> > I followed these steps:
> > #/opt/nifi/current/bin/nifi.sh install
> > #chkconfig nifi on
> > #service nifi start
> >
> > That copies the nifi.sh script into /etc/init.d correctly, however it
> can't
> > start as a service because the "dirname" when starting as a service (at
> > least in my case) appears to be /etc/init.d, instead of the nifi bin dir,
> > resulting in this error:
> >
> > #$ sudo service nifi start
> > #/etc/init.d/nifi: line 28: /etc/init.d/nifi-env.sh: No such file or
> > directory
> >
> > I changed the SCRIPT_DIR variable to be my current nifi bin dir, to get
> it
> > to work.
> >
> >1. From: # SCRIPT_DIR=$(dirname "$0")
> >2. To: # SCRIPT_DIR=/opt/nifi/current/bin
> >
> >
> > Thanks,
> > Ryan
> >
>


-- 
--
yolanda.m.da...@gmail.com
@YolandaMDavis


Re: 0.7.0 install bug centos 7

2016-06-20 Thread Nicholas Hughes
FWIW, I "fixed" this on my system with a different workaround:

1. Don't use the "install" option.
2. Symlink /etc/init.d/nifi to /opt/nifi/current/bin/nifi.sh
3. Edit the script to use readlink and find the actual install directory:
SCRIPT_DIR=$(dirname $(readlink $0 || echo $0))
SCRIPT_NAME=$(basename $(readlink $0 || echo $0))
(from memory, so I think that should work)

Not perfect, but seemed cleaner than having two nifi scripts kicking
around...

-Nick


On Mon, Jun 20, 2016 at 7:01 PM, James Wing  wrote:

> Thanks for reporting this, Ryan, I see the same behavior.  I created a JIRA
> for this issue (https://issues.apache.org/jira/browse/NIFI-2063).  If you
> need a workaround, you can edit /etc/init.d/nifi to hard-code the path to
> the script directory:
>
> SCRIPT_DIR=/opt/nifi/current/bin
> SCRIPT_NAME=$(basename "$0")
> PROGNAME=nifi.sh
>
> . "$SCRIPT_DIR"/nifi-env.sh
>
> ...
>
> Thanks,
>
> James
>
> On Mon, Jun 20, 2016 at 2:33 PM, Ryan H 
> wrote:
>
> > Looks like 0.7.0 doesn't install as a service quite right on linux/centos
> > 7.
> >
> > I untar'd it in:
> >  #/opt/nifi/current -> nifi-0.7.0-SNAPSHOT
> >
> > I followed these steps:
> > #/opt/nifi/current/bin/nifi.sh install
> > #chkconfig nifi on
> > #service nifi start
> >
> > That copies the nifi.sh script into /etc/init.d correctly, however it
> can't
> > start as a service because the "dirname" when starting as a service (at
> > least in my case) appears to be /etc/init.d, instead of the nifi bin dir,
> > resulting in this error:
> >
> > #$ sudo service nifi start
> > #/etc/init.d/nifi: line 28: /etc/init.d/nifi-env.sh: No such file or
> > directory
> >
> > I changed the SCRIPT_DIR variable to be my current nifi bin dir, to get
> it
> > to work.
> >
> >1. From: # SCRIPT_DIR=$(dirname "$0")
> >2. To: # SCRIPT_DIR=/opt/nifi/current/bin
> >
> >
> > Thanks,
> > Ryan
> >
>


Re: 0.7.0 install bug centos 7

2016-06-20 Thread James Wing
Thanks for reporting this, Ryan, I see the same behavior.  I created a JIRA
for this issue (https://issues.apache.org/jira/browse/NIFI-2063).  If you
need a workaround, you can edit /etc/init.d/nifi to hard-code the path to
the script directory:

SCRIPT_DIR=/opt/nifi/current/bin
SCRIPT_NAME=$(basename "$0")
PROGNAME=nifi.sh

. "$SCRIPT_DIR"/nifi-env.sh

...

Thanks,

James

On Mon, Jun 20, 2016 at 2:33 PM, Ryan H  wrote:

> Looks like 0.7.0 doesn't install as a service quite right on linux/centos
> 7.
>
> I untar'd it in:
>  #/opt/nifi/current -> nifi-0.7.0-SNAPSHOT
>
> I followed these steps:
> #/opt/nifi/current/bin/nifi.sh install
> #chkconfig nifi on
> #service nifi start
>
> That copies the nifi.sh script into /etc/init.d correctly, however it can't
> start as a service because the "dirname" when starting as a service (at
> least in my case) appears to be /etc/init.d, instead of the nifi bin dir,
> resulting in this error:
>
> #$ sudo service nifi start
> #/etc/init.d/nifi: line 28: /etc/init.d/nifi-env.sh: No such file or
> directory
>
> I changed the SCRIPT_DIR variable to be my current nifi bin dir, to get it
> to work.
>
>1. From: # SCRIPT_DIR=$(dirname "$0")
>2. To: # SCRIPT_DIR=/opt/nifi/current/bin
>
>
> Thanks,
> Ryan
>


0.7.0 install bug centos 7

2016-06-20 Thread Ryan H
Looks like 0.7.0 doesn't install as a service quite right on linux/centos 7.

I untar'd it in:
 #/opt/nifi/current -> nifi-0.7.0-SNAPSHOT

I followed these steps:
#/opt/nifi/current/bin/nifi.sh install
#chkconfig nifi on
#service nifi start

That copies the nifi.sh script into /etc/init.d correctly, however it can't
start as a service because the "dirname" when starting as a service (at
least in my case) appears to be /etc/init.d, instead of the nifi bin dir,
resulting in this error:

#$ sudo service nifi start
#/etc/init.d/nifi: line 28: /etc/init.d/nifi-env.sh: No such file or
directory

I changed the SCRIPT_DIR variable to be my current nifi bin dir, to get it
to work.

   1. From: # SCRIPT_DIR=$(dirname "$0")
   2. To: # SCRIPT_DIR=/opt/nifi/current/bin


Thanks,
Ryan