Support Questions

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

Can you rolling upgrade the JDK on a cluster

avatar
Explorer

I was planning on doing a rolling restart of our CDH Manager managed Hadoop, HBase, ZK, and Yarn cluster when I came across this documentation: https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html#pcm_...

 

"Running CDH nodes within the same cluster on different JDK releases is not supported. JDK release across a cluster needs to match the patch level."

 

I was planning to do a jdk upgrade from jdk1.8.0_101 to jdk1.8.0.144, however does the above mean that I shouldnt do a rolling restart to get there?  Or does that just mean i shouldnt leave them on different jdk versions longterm?

1 ACCEPTED SOLUTION

avatar
Super Collaborator
Found it
https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html
Additionally, since Cloudera does not support mixed environments, all nodes in your cluster must be running the same major JDK version. Cloudera only supports JDKs provided by Oracle.



In any case you are doing upgrade, you will not have this status for long time.

View solution in original post

8 REPLIES 8

avatar
Explorer

Does anyone know?

avatar
Community Manager

The JDK is considered part of the operating system and is not managed by Cloudera Manager. You will have to deploy the new JDK manually, via scripts, or an OS management software.

 

There is a way to have Cloudera managed services to only pick up the new JDK during a rolling restart and limit the window where different versions of the JDK will be in use:

 

Before deploying the new JDK, go to the Hosts configuration in Cloudera Manager and specify the "Java Home Directory". This will override the auto-detection logic that is normally used to identify the Java version.

 

Don't remove the prior version of the JDK while installing the new JDK on your hosts. Once you have deployed the new version of the JDK on all hosts either clear the "Java Home Directory" configuration or set it to your new version. You may now perform a rolling restart and the services will pick up the new JDK.



David Wilder, Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Terms of Service

Community Guidelines

How to use the forum

avatar
Explorer

Denloe, thanks for the answer, I appreciate it.

 

You kind of answered my question but in a roundabout way.  I was more asking with whether or not a cluster should run on different versions of the JDK for the amount of time a rolling restart takes. 

 

i.e. is it safe to rolling restart a cluster to pick up different versions of the JDK?

 

The page I linked to indicates to not run a cluster with jdk versions, but from what you are saying it sounds like its okay to rolling restart upgrade it.

avatar
Super Collaborator

No you cannot, according to third bullet (from https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_cm_upgrading_to_jdk8.html)

 

Warning:

* Cloudera does not support upgrading to JDK 1.8 while upgrading to Cloudera Manager 5.3 or higher. The Cloudera Manager Server must be upgraded to 5.3 or higher before you start.
* Cloudera does not support upgrading to JDK 1.8 while upgrading a cluster to CDH 5.3 or higher. The cluster must be running CDH 5.3 or higher before you start.
* Cloudera does not support a rolling upgrade to JDK 1.8. You must shut down the entire cluster.
* If you are upgrading from a lower major version of the JDK to JDK 1.8 or from JDK 1.6 to JDK 1.7, and you are using AES-256 bit encryption, you must install new encryption policy files. (In a Cloudera Manager deployment, you automatically install the policy files; for unmanaged deployments, install them manually.) See Using AES-256 Encryption.


For both managed and unmanaged deployments, you must also ensure that the Java Truststores are retained during the upgrade. (See Recommended Keystore and Truststore Configuration.)

avatar
Explorer

Gekas, that bullet is specifically for upgrading to jdk 1.8, not for upgrading between patch versions of 1.8. 

avatar
Super Collaborator
Sorry, I thought you were asking for major upgrade. For minor upgrades of
course you can do a rolling upgrade. I have personally tested it. I cannot
find it know because I am replying from my phone, but I think there is a
comment in documentation that the mandatory is to have the same major
version, it does not mention minor. But in any case I have done it several
times in production environment and works without any issue.


avatar
Super Collaborator
Found it
https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html
Additionally, since Cloudera does not support mixed environments, all nodes in your cluster must be running the same major JDK version. Cloudera only supports JDKs provided by Oracle.



In any case you are doing upgrade, you will not have this status for long time.

avatar
Explorer

@GeKas you are the Hero of the day.  You saved me from having to call a production maintenance window.  Thanks for your help.