The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Ambari Forum

HDP using Puppet

  • #23958
    Ray Roberts

    I’m currently administering a HDP cluster and some of our users are claiming they need to use JDK 7 (not open JDK). I know this isn’t supported yet, however I’m not sure I have much of a choice, as they’re pretty demanding :)

    I’m noticing that HDP is putting open jdk in /usr/jdk/jdk1.6.0 even after I’ve wiped that directory. I have seen some references to puppet in Ambari directories. Is Ambari using puppet?

    If so, how can I modify which version is pushed?


  • Author
  • #23964

    Hi Ray,

    How is your day so far? It is not recommended to use the JDK 7. It will fail. But you may want to take a look at the following files:
    files :



    Ray Roberts



    So, it sound like Ambari IS using puppet…… We use puppet throughout our enterprise and didn’t notice puppet was installed on the data nodes, as I had to install the puppet agent to tie these nodes into our enterprise puppet master. Is the ambari-agent pushing these configs then? How is ambari leveraging puppet?

    What exactly will fail?


    Seth Lyubich

    Hi Ray,

    You should be able to specify custom Java location during installation. Please see:

    However, JDK 7 was not tested yet and we would not be able to support this configuration.

    Also, puppet that Ambari is using is part of ambari-agent and should not interfere with your puppet.

    Hope this helps,


    Ray Roberts


    Thanks for your response.

    So, does this mean I cannot change it now that HDP is installed?

    Can I run ambari-server setup after installation? For example: ambari-server setup –j /usr/java/default




    Hi Ray,

    That is correct. But before you run this command. Are you trying to setup a new cluster? If not please backup the psql database just in-case. I have run the command and it works fine.

    ambari-server setup –j /usr/java/default
    Using python /usr/bin/python2.6
    Run postgresql initdb
    Run postgresql start
    Starting postgresql service: [ OK ]
    Setup ambari-server
    Checking SELinux…
    SELinux status is ‘enabled’
    SELinux mode is ‘permissive’
    WARNING: SELinux is set to ‘permissive’ mode and temporarily disabled. You should disable SELinux permanently.
    OK to continue [y/n] (y)? y
    Checking iptables…
    iptables is disabled now
    Checking PostgreSQL…
    Configuring database…
    Configuring PostgreSQL…
    Backup for pg_hba found, reconfiguration not required
    Checking JDK…
    Completing setup…
    Ambari Server ‘setup’ finished successfully


    Ray Roberts


    I tried using ‘ambari-server setup –j /my/jdk/home’ , however, it still downloads jdk-6u21 and asks for me to accept the oracle license. Shouldn’t it see my java installed and not ask this?




    Hi Ray,
    Based on Abdelrahman’s post, it could be that ambari needs it to be in /usr/java/default


    Ray Roberts


    Thanks for the reply.

    I tried both paths, including /usr/java/default

    It behaves the same way, no matter the location.


    Carlos Diaz

    Hi Ray,

    I’m experiencing the exact same issue. The developers want to use JDK 1.7 yet Ambari uses jdk1.6.0_31 by default.

    Were you able to figure out how to swap the jdk sucessfully? I tried going through the ambari-server setup -j <path to my jdk> as described here, but things are still starting up with JDK 1.6.0_31.


    Jeff Sposetti

    Hi Carlos + Ray, Can you confirm which ambari version you tried this on? ambari-server –version

    Latest release is Ambari 1.4.2 supports JDK 7, with you installing the JDK before running setup and using the -j option. Ambari Server should not still download JDK 1.6 during setup if you specify -j during “ambari-server setup -j /the/jdk/path”

    Ray Roberts

    Jeff, Carlos,

    I was able to install the latest (1.4.2) using JDK 7 with no issues.

    The other thing I did was modify /etc/ambari-server/conf/

    I commented the section pertaining to java. I can’t recall the exact section since I’m not around the server at the moment, however it was pretty obvious. I remember this causing me problems if I didn’t do it, Ambari would try to install JDK 1.6 if I didn’t modify the properties file.

The forum ‘Ambari’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.