Administering Ambari
Also available as:
PDF
loading table of contents...

Change the JDK version

During your initial Ambari Server Setup, you select the JDK to use or provide a path to a custom JDK already installed on your hosts. After setting up your cluster, you may change the JDK version.

The choice of JDK depends on which HDP Stack you plan to install in your cluster.

See the Hortonworks Support Matrix for version compatability information.

To change the JDK version for an existing cluster:

  1. On the Ambari Server host, re-run Ambari Server Setup.
    ambari-server setup
  2. At the prompt: change the JDK ?, Enter y.
  3. At the prompt: Do you want to change Oracle JDK [y/n] (n)?, Enter y.
  4. At the prompt:choose a JDK:, Enter 1 to change the JDK to v1.8.
    OptionDescription
    [1] - Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8 If you choose Oracle JDK 1.8, the JDK you choose downloads and installs automatically on the Ambari Server host. This option requires that you have an internet connection. You must install this JDK on all hosts in the cluster to this same path.
    [2] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7 If you choose Oracle JDK 1.7, the JDK you choose downloads and installs automatically on the Ambari Server host. This option requires that you have an internet connection. You must install this JDK on all hosts in the cluster to this same path.
    [3] - Custom JDK If you choose 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
    Important
    If you use a custom JDK, AND if kerberos is enabled with AES-256 encryption. 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 are running Kerberos and do not update the JCE to match the JDK, you will have issues starting services.
After setup completes, you must restart each component for the new JDK to be used by the Hadoop services. Using the Ambari Web UI, do the following tasks:
  1. Restart all services.
  2. Restart Ambari Server.

    ambari-server restart

Important
Important
If, after upgrading the JDK to 1.8, you experience issues with communication between Ambari Server and Ambari Agents, refer to Java/Python updates and Ambari Agent TLS settings in Hortonworks Community Connection for more information.