Good evening. I downloaded NiFi 1.3.0 to a linux EC2 instance in AWS I recently created. A uname -or tells me the version of Linux I am running: 4.9.20-11.31.amzn1.x86_64 GNU/Linux
I tried to establish nifi as a service. I was the root user - not the nifi user - I changed to the bin directory of my nifi installation and ran
I got this small /etc/init.d/nifi file:
I then executed
service nifi start
I expected the service to start owned by user nifi, because in my bootstrap.conf file I set
It never started. I got this error:
[root@ip-10-0-0-21 init.d]# service nifi start
nifi.sh: JAVA_HOME not set; results may vary
NiFi home: /local/opt/nifi/nifi-1.3.0
Bootstrap Config File: /local/opt/nifi/nifi-1.3.0/conf/bootstrap.conf
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/nifi/bootstrap/RunNiFi : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
I tried to determine what version of java, and this is what I learned:
[root@ip-10-0-0-21 init.d]# which java
[root@ip-10-0-0-21 init.d]# ls -tl /usr/bin/java
lrwxrwxrwx 1 root root 22 Apr 17 07:58 /usr/bin/java -> /etc/alternatives/java
[root@ip-10-0-0-21 init.d]# ls -tl /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Apr 17 07:58 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
[root@ip-10-0-0-21 init.d]# uname -or
As user nifi, I try to determine my java version but it cannot find javac:
[nifi@ip-10-0-0-21 conf]$ javac -version
bash: javac: command not found
I started an EC2 that is supposed to have java on it but evidently it must not.
So my questions:
* has anyone conquered this problem, and if so can you offer any guidance?
* Does that jre-1.7.0 mean I am doomed from the start here because NiFi 1.3.0 requires java 8?
* should I run the run/sh install to set up as a service as root?
Thank you in advance for any help.-Jim
NiFi 1.0+ explicitly requires Java 8.
As far as service installation, it is likely needed to be done as root for touching those parts of the system.
Would also suggest using the script to install the service.
Let us know if you hit hurdles after getting JRE 8 installed.
Sent from my mobile device.
On Jun 12, 2017, at 17:46, James McMahon <[hidden email]> wrote:
Will do. Thanks very much Aldrin. I will work on getting Java 8 installed this morning, and then retry starting it as a service.
Should I rebuild that /etc/init.d/nifi service file using the command (as root, once again) ./nifi.sh install? I ask because this service script for nifi looks too small compared to what I am used to seeing:
the small /etc/init.d/nifi file:
Or is this what you expect to see with NiFi 1.3.0?
Thanks again. Will follow up later. -Jim
On Mon, Jun 12, 2017 at 9:23 PM, Aldrin Piri <[hidden email]> wrote:
|Free forum by Nabble||Edit this page|