Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is there a set way to change jdk from 1.8.0_40 to 1.8.0_60

avatar
Expert Contributor

Currently default JDK is jdk1.8.0_40 which seems to have issues with Kerberos. Currently at HDP 2.3.2, and Ambari 2.1.2. Customer is planning on setting this up with jdk1.8.0_60 and needs conformation that these below changes are enough for jdk1.8.0_60 to be accepted as new default in file serverSetup.py: JDKRelease("jdk1.8", "Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8", "http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u40-linux-x64.tar.gz", "jdk-8u40-linux-x64.tar.gz", "http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip", "jce_policy-8.zip", "/usr/jdk64/jdk1.8.0_40", "(jdk.*)/jre") He will change names from jdk1.8.0_40 to jdk1.8.0_60 and use my own repository to host the file. Not touching jce-policy. Could you please confirm if these changes are enough?

1 ACCEPTED SOLUTION

avatar

Cassandra,

We have an official documentation on switching JDKs in a cluster, please refer to http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/ch_changin...

View solution in original post

5 REPLIES 5

avatar

Hi Cassandra,

we did this upgrade last week on a HDP 2.3.2 /Ambari 2.1.2 cluster.

We basically installed the Java JDK 1.8.0._60 including the latest JCE files, changed the paths in the /etc/ambari-server/conf/ambari.properties file and restarted the ambari server. Make sure you restart all services and check ps output if all services picked up the newest JDK.

I am not familiar with the serverSetup.py, but above procedure did work and all functionality is running. (Engineering confirmed that JDK 1.8.0_60 upgrade should not produce any problems at the moment)

Jonas

avatar

Cassandra,

We have an official documentation on switching JDKs in a cluster, please refer to http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/ch_changin...

avatar
Expert Contributor

Yeah I pointed them to the documentation but of course they want to do it their way. I'll reinforce the documented way. Thanks guys!

avatar

Be careful with the docs though, if you use the way its stated in the documentation (=> ambari-server setup), ambari will also ask you about changing user accounts and database configurations. Although the DB scripts are not executed again, this might be a bit confusing.

avatar
New Contributor

i spent 5 hours to find the proper code for downloading the latest JDK which is 1.8_92 currently.

Guys be aware that the oracle website needs you to accept the license and you have to put it in you command line. the following code is working perfectly. enjoy

#

sudo wget --no-cookie --no-check-certificate --header "Cookie:gpw_e24=http%sA2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz?AuthParam=1465316438_...

#

mkdir /usr/java

#

mv jdk-8u92-linux-x64.tar.gz /usr.java/jdk-8u92-linux-x64.tar.gz

#

tar zxvf jdk-8u92-linux-x64.tar.gz

#

ln -s /usr/java/jdk1.8.0_92 /usr/java/default

#

export JAVA_HOME=/usr/java/default

#

export PATH=$JAVA_HOME/bin:$PATH