Created 02-03-2017 10:57 PM
While installing HDF Nifi 2.4 cluster (Ambari) I used Java 7 Installation (option 2). later I also installed java 8, I see a major/minor version conflict while running Nifi. I am not sure changing the default path in my Nifi.py would resolve the issue ? the default JAVA_HOME in this file is /usr/jdk64, which is accessed using a variable 'params.jdk64_home', however I want to change this to /usr/lib/jvm.
My default JAVA_HOME is also set as per new version i.e.
/usr/lib/jvm/java-8-oracle
Plz suggest how can I change this?
Created on 02-03-2017 11:18 PM - edited 08-18-2019 05:00 AM
If I understand you correctly, below would help:
If you have Java version conflict, and already have latest version installed. Please try updating java property with full path of your java8 binary under services->NiFi->Advanced nifi-bootstrap-env in Ambari as below:
Update to like below with your full java 8 path:
Once updated, restart the service and see if you still have issues.
if not using Ambari, update below section in./conf/bootstrap.conf file.
# Java command to use when running NiFi
java=java
Created 02-04-2017 09:49 AM
thanks @Jobin George
But I tried doing this, set the path.. but it still refers to the same jdk64 path in the error file for Nifi Start. I am attaching this file along.
Please suggest how can I update this or directly reset path for $JAVA_HOME.
Please refer to the file below.
Created 02-04-2017 04:52 PM
Hi @Saurabh Verma,
- Looks like 'NiFi Certificate Authority' is still using the Ambari provided java rather than what you provide in custom configs as well in "Template for nifi-env.sh" [but if you try just starting NiFi individually rather than trying whole service with above provided update NiFi should come up, but not NiFi-CA].
- Do you think Updating java version for Ambari is an option? (hoping it doesn't break anything else). if so, please follow the link below and choose option 3 [Custom JDK] in step 3 and enter your new java home location.
Let me know if this helps.
Created 02-04-2017 09:48 AM
thanks @Jobin George
But I tried doing this, set the path.. but it still refers to the same jdk64 path in the error file for Nifi Start. I am attaching this file along.
Please suggest how can I update this or directly reset path for $JAVA_HOME.
Please refer to the file below.
Created 02-06-2017 09:27 PM
How to change the JDK version for an existing cluster
ambari-server setup
Do you want to change Oracle JDK [y/n] (n)?
y
1
to change the JDK to v1.8.[1] - Oracle JDK 1.8
[2] - Oracle JDK 1.7
[3] - Custom JDK
Custom JDK
, verify or add the custom JDK path on all hosts in the cluster. Use this option if you want to use OpenJDK or do not have an internet connection (and have pre-installed the JDK on all hosts).Important |
---|
You must also update your JCE security policy files on the Ambari Server and all hosts in the cluster to match the new JDK version. If you do not update the JCE to match the JDK, you may have issues starting services. Refer to the Ambari Security Guide for more information on Installing the JCE. |
Thanks,
Matt