Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Solved Go to solution

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Expert Contributor

Looks correct. Can you please copy the yum command used to install JDK 1.8 plus it's full output to here? 

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Explorer

"yum install java-1.8.0-openjdk-devel"

[root@quickstart cloudera]# yum install java-1.8.0-openjdk-devel
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.activecloud.co.il
 * epel: epel.scopesky.iq
 * extras: centos.interhost.net.il
 * updates: centos.activecloud.co.il
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.212.b04-0.el6_10 will be installed
--> Processing Dependency: java-1.8.0-openjdk = 1:1.8.0.212.b04-0.el6_10 for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libawt_xawt.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libjvm.so()(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libjava.so()(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libawt_xawt.so()(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libawt.so()(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.212.b04-0.el6_10 will be installed
--> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.8.0-openjdk-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.212.b04-0.el6_10.x86_64
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.212.b04-0.el6_10 will be installed
--> Processing Dependency: tzdata-java >= 2014f-1 for package: 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: pcsc-lite-libs(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: lksctp-tools(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64
--> Processing Dependency: jpackage-utils for package: 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64
--> Running transaction check
---> Package giflib.x86_64 0:4.1.6-3.1.el6 will be installed
---> Package jpackage-utils.noarch 0:1.7.5-3.16.el6 will be installed
---> Package lksctp-tools.x86_64 0:1.0.10-7.el6 will be installed
---> Package pcsc-lite-libs.x86_64 0:1.5.2-16.el6 will be installed
---> Package tzdata-java.noarch 0:2019a-1.el6 will be installed
---> Package xorg-x11-fonts-Type1.noarch 0:7.2-11.el6 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Running transaction check
---> Package ttmkfdir.x86_64 0:3.0.9-32.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================
 Package                              Arch            Version                              Repository        Size
==================================================================================================================
Installing:
 java-1.8.0-openjdk-devel             x86_64          1:1.8.0.212.b04-0.el6_10             updates           10 M
Installing for dependencies:
 giflib                               x86_64          4.1.6-3.1.el6                        base              37 k
 java-1.8.0-openjdk                   x86_64          1:1.8.0.212.b04-0.el6_10             updates          228 k
 java-1.8.0-openjdk-headless          x86_64          1:1.8.0.212.b04-0.el6_10             updates           32 M
 jpackage-utils                       noarch          1.7.5-3.16.el6                       base              60 k
 lksctp-tools                         x86_64          1.0.10-7.el6                         base              79 k
 pcsc-lite-libs                       x86_64          1.5.2-16.el6                         base              28 k
 ttmkfdir                             x86_64          3.0.9-32.1.el6                       base              43 k
 tzdata-java                          noarch          2019a-1.el6                          updates          188 k
 xorg-x11-fonts-Type1                 noarch          7.2-11.el6                           base             520 k

Transaction Summary
==================================================================================================================
Install      10 Package(s)

Total download size: 43 M
Installed size: 146 M
Is this ok [y/N]: y  
Downloading Packages:
http://centos.activecloud.co.il/6.10/os/x86_64/Packages/giflib-4.1.6-3.1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 502 Bad Gateway"
Trying other mirror.
(1/10): giflib-4.1.6-3.1.el6.x86_64.rpm                                                    |  37 kB     00:00     
(2/10): java-1.8.0-openjdk-1.8.0.212.b04-0.el6_10.x86_64.rpm                               | 228 kB     00:00     
(3/10): java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64.rpm                         |  10 MB     00:03     
(4/10): java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64.rpm                      |  32 MB     00:11     
(5/10): jpackage-utils-1.7.5-3.16.el6.noarch.rpm                                           |  60 kB     00:00     
(6/10): lksctp-tools-1.0.10-7.el6.x86_64.rpm                                               |  79 kB     00:00     
(7/10): pcsc-lite-libs-1.5.2-16.el6.x86_64.rpm                                             |  28 kB     00:00     
(8/10): ttmkfdir-3.0.9-32.1.el6.x86_64.rpm                                                 |  43 kB     00:00     
(9/10): tzdata-java-2019a-1.el6.noarch.rpm                                                 | 188 kB     00:00     
(10/10): xorg-x11-fonts-Type1-7.2-11.el6.noarch.rpm                                        | 520 kB     00:00     
------------------------------------------------------------------------------------------------------------------
Total                                                                             1.9 MB/s |  43 MB     00:22     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : jpackage-utils-1.7.5-3.16.el6.noarch                                                          1/10 
  Installing : giflib-4.1.6-3.1.el6.x86_64                                                                   2/10 
  Installing : lksctp-tools-1.0.10-7.el6.x86_64                                                              3/10 
  Installing : pcsc-lite-libs-1.5.2-16.el6.x86_64                                                            4/10 
  Installing : tzdata-java-2019a-1.el6.noarch                                                                5/10 
  Installing : 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64                                   6/10 
  Installing : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                7/10 
  Installing : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                        8/10 
  Installing : 1:java-1.8.0-openjdk-1.8.0.212.b04-0.el6_10.x86_64                                            9/10 
  Installing : 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64                                     10/10 
  Verifying  : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                1/10 
  Verifying  : 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64                                   2/10 
  Verifying  : tzdata-java-2019a-1.el6.noarch                                                                3/10 
  Verifying  : 1:java-1.8.0-openjdk-devel-1.8.0.212.b04-0.el6_10.x86_64                                      4/10 
  Verifying  : 1:java-1.8.0-openjdk-1.8.0.212.b04-0.el6_10.x86_64                                            5/10 
  Verifying  : pcsc-lite-libs-1.5.2-16.el6.x86_64                                                            6/10 
  Verifying  : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                        7/10 
  Verifying  : lksctp-tools-1.0.10-7.el6.x86_64                                                              8/10 
  Verifying  : giflib-4.1.6-3.1.el6.x86_64                                                                   9/10 
  Verifying  : jpackage-utils-1.7.5-3.16.el6.noarch                                                         10/10 

Installed:
  java-1.8.0-openjdk-devel.x86_64 1:1.8.0.212.b04-0.el6_10                                                        

Dependency Installed:
  giflib.x86_64 0:4.1.6-3.1.el6                                java-1.8.0-openjdk.x86_64 1:1.8.0.212.b04-0.el6_10 
  java-1.8.0-openjdk-headless.x86_64 1:1.8.0.212.b04-0.el6_10  jpackage-utils.noarch 0:1.7.5-3.16.el6             
  lksctp-tools.x86_64 0:1.0.10-7.el6                           pcsc-lite-libs.x86_64 0:1.5.2-16.el6               
  ttmkfdir.x86_64 0:3.0.9-32.1.el6                             tzdata-java.noarch 0:2019a-1.el6                   
  xorg-x11-fonts-Type1.noarch 0:7.2-11.el6                    

Complete!

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Expert Contributor

There is no error here, all packages installed fine.

 

Just out of interest, why did you install the "-devel" package? This is not required but does not harm either.

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Explorer
Great!
Now why I am still seeing java 1.7 in the Cloudera Manager and when “Java -version”.
By the way I am using the Cloudera quickstart vm. And I am doubting that there is something that forces java 1.7 and even reset JAVA_HOME to the 1.7 folder on every restart ... am I right?

What to do next?

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Expert Contributor

The Quickstart VM is a especially tailored CM/CDH cluster installation on a single VM. If you attempt to upgrade this to 6.x you will encounter a lot of issues. I personally would recommend doing a native installation of 6.2 instead.

 

But if you want to continue on that route, the CM server process needs to be configured to start up with this JDK installation, see step 4 in Manually Migrating from Oracle JDK to OpenJDK

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Explorer

OK I have chosen to install Cloudera 6.2 from scratch.

 

Now when I run 

sudo apt-get install oracle-j2sdk1.8

it completes successfully.... however after it finishes I can't find any java folder under /usr !!

 

And when I move to the next step of enabling auto-TLS, and run 
 

sudo JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera /opt/cloudera/cm-agent/bin/certmanager setup --configure-services

 

I get the following exception

Exception: Cannot identify a valid keytool: /usr/java/jdk1.8.0_181-cloudera/bin/keytool

and when i "java --version"  i get 

The program 'java' can be found in the following packages:
 * default-jre
 * gcj-5-jre-headless
 * openjdk-8-jre-headless
 * gcj-4.8-jre-headless
 * gcj-4.9-jre-headless
 * openjdk-9-jre-headless
Try: sudo apt install <selected package>

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Expert Contributor

Can you please verify your JDK installation:

# apt list oracle-j2sdk1.8
# dpkg-query -L oracle-j2sdk1.8

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Explorer

For 

apt list oracle-j2sdk1.8

I got

 

tmah@masternode:~$ apt list oracle-j2sdk1.8
Listing... Done
oracle-j2sdk1.8/unknown,now 1.8.0+update181-1 amd64 [installed]

 

 

And for 

dpkg-query -L oracle-j2sdk1.8

 

I got a lot! The following are the last 20 lines

 

....
....
....
/usr/lib/jvm/java-8-oracle-cloudera/include
/usr/lib/jvm/java-8-oracle-cloudera/include/jdwpTransport.h
/usr/lib/jvm/java-8-oracle-cloudera/include/linux
/usr/lib/jvm/java-8-oracle-cloudera/include/linux/jawt_md.h
/usr/lib/jvm/java-8-oracle-cloudera/include/linux/jni_md.h
/usr/lib/jvm/java-8-oracle-cloudera/include/classfile_constants.h
/usr/lib/jvm/java-8-oracle-cloudera/include/jni.h
/usr/lib/jvm/java-8-oracle-cloudera/include/jvmticmlr.h
/usr/lib/jvm/java-8-oracle-cloudera/include/jawt.h
/usr/lib/jvm/java-8-oracle-cloudera/include/jvmti.h
/usr/lib/jvm/java-8-oracle-cloudera/THIRDPARTYLICENSEREADME-JAVAFX.txt
/usr/lib/jvm/java-8-oracle-cloudera/LICENSE
/usr/lib/jvm/java-8-oracle-cloudera/release
/usr/share
/usr/share/doc
/usr/share/doc/oracle-j2sdk1.8
/usr/share/doc/oracle-j2sdk1.8/changelog.gz
/usr/lib/jvm/java-8-oracle-cloudera/jre/bin/ControlPanel
/usr/lib/jvm/java-8-oracle-cloudera/jre/lib/amd64/server/libjsig.so
/usr/lib/jvm/java-8-oracle-cloudera/bin/ControlPanel
/usr/lib/jvm/java-8-oracle-cloudera/man/ja

Thanks 

Highlighted

Re: Oracle-j2sdk1.8 installation failed - Cloudera Manger Install

Expert Contributor

This confirmes the package is installed correctly, and the JDK is installed to /usr/lib/jvm/java-8-oracle-cloudera/

You may want to use this as JAVA_HOME when configuring CM and the cluster to use this JDK