SETUP JAVA 1.8 ON CLOUDERA MANAGER 7

1.     Verify the java and JRE location

[ec2-user@ip-172-31-57-197 ~]$ ls /usr/java/jdk1.8.0_232-cloudera/
ASSEMBLY_EXCEPTION  demo     jre  LICENSE  release  src.zip
bin                 include  lib  man      sample   THIRD_PARTY_README

2.     Verify the JAVA HOME path for cloudera-scm-server. (if you already set the java path, then ignore this step)

[root@ip-172-31-57-197 ec2-user] cat export JAVA_HOME=/usr/java/jdk1.8.0_232-cloudera/ > /etc/default/cloudera-scm-server 

3.     Now change the JAVA_HOME path for other users by going to edit /etc/profile.

[root@ip-172-31-57-197 ec2-user]# vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_232-cloudera/
export JRE_HOME=/usr/java/jdk1.8.0_232-cloudera/jre/
export PATH=$JAVA_HOME/bin:$PATH

4.     Now you have to update your /etc/profile using the source command and check the new java version.

[root@ip-172-31-57-197 ec2-user]# source /etc/profile

5.     Now change JAVA_HOME path in /etc/bashrc file

[root@ip-172-31-57-197 ec2-user]# vi /etc/bashrc

export JAVA_HOME=/usr/java/jdk1.8.0_232-cloudera/
export JRE_HOME=/usr/java/jdk1.8.0_232-cloudera/jre/

export JAVA_HOME=/usr/java/jdk1.8.0_232-cloudera/
export JRE_HOME=/usr/java/jdk1.8.0_232-cloudera/jre/
export PATH=$JAVA_HOME/bin:$PATH

6.     Now you have to update your /etc/bashrc using the source command in the root user and other users.

[root@ip-172-31-57-197 ec2-user]# source /etc/bashrc

[root@ip-172-31-57-197 ec2-user]# exit
exit
[ec2-user@ip-172-31-57-197 ~]$ source .bashrc

7. Now check the java version using the following command:

[ec2-user@ip-172-31-57-197 ~]$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)

8.     Now go to Cloudera Manager and wait for a few minutes.

Enter your Public IP Address in the link given below to access Cloudera manager http://Public IP Address:7180

9.     Click on Host, and then from the drop-down menu, click on All host.

10.      Click on Configuration:

11. Inside the search tab, just type “java”

12.      Inside the JAVA HOME Directory, paste the JAVA_HOME path

/usr/java/jdk1.8.0_232-cloudera/

13. Now you may see Stale Configurations in some of the services

14. Click on Stale Configuration Restart in  Cloudera Management service

Wait a few seconds and click on finish.

  • Click on the drop up menu under Cloudera Management Service, and from the drop-down menu, click on Restart and then
  • Restart cluster
  • Click on the Restart option.

   15. Now verify (Java Development Kit version) /usr/java/jdk1.8.0_232-cloudera is updated or not for the Cloudera Manager.

[ec2-user@ip-172-31-57-197 ~]$ ps -ef | grep namenode
ec2-user  3333  3303  0 17:49 pts/2    00:00:00 grep --color=auto namenode
hdfs     29736 29698  2 17:44 ?        00:00:09 /usr/java/jdk1.8.0_232-cloudera//bin/java -Dproc_secondarynamenode -Xmx1000m -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs -Dhadoop.log.file=hadoop-cmf-hdfs-SECONDARYNAMENODE-ip-172-31-57-197.ec2.internal.log.out -Dhadoop.home.dir=/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hadoop -Dhadoop.id.str=hdfs -Dhadoop.root.logger=INFO,RFA -Djava.library.path=/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xms394264576 -Xmx394264576 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/hdfs_hdfs-SECONDARYNAMENODE-bd8fc81d169f3dff67669e64e7c7468f_pid29736.hprof -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh -Dhadoop.security.logger=INFO,RFAS org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode
hdfs     29738 29710  5 17:44 ?        00:00:17 /usr/java/jdk1.8.0_232-cloudera//bin/java -Dproc_namenode -Xmx1000m -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs -Dhadoop.log.file=hadoop-cmf-hdfs-NAMENODE-ip-172-31-57-197.ec2.internal.log.out -Dhadoop.home.dir=/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hadoop -Dhadoop.id.str=hdfs -Dhadoop.root.logger=INFO,RFA -Djava.library.path=/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xms394264576 -Xmx394264576 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/hdfs_hdfs-NAMENODE-bd8fc81d169f3dff67669e64e7c7468f_pid29738.hprof -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh -Dhadoop.security.logger=INFO,RFAS org.apache.hadoop.hdfs.server.namenode.NameNode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s