Home Forums HDP on Linux – Installation Changing Java version on Ambari

This topic contains 4 replies, has 5 voices, and was last updated by  Jeff Sposetti 2 weeks, 6 days ago.

  • Creator
    Topic
  • #41329

    I have the Amabri server installed and setup and up and running on Java JDK 1.7
    Since I am seeing on the forum that many are having issues with 1.7 , I would like to change it to 1.6 update 31 before I retry my cluster install. 1.3.2

    After I remove/uninstall JDK 1.7 , and installing 1.6
    What do I need to do to make the ambari server run on 1.6,
    Do I need to re – do ambari- setup option with -j and change the propperties file and restart the ambari server ?
    Anything else I need to do ?
    Please let me know.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #50759

    Jeff Sposetti
    Moderator

    There are changes coming to ambari-server setup to make changing JDK a lot easier.

    Please look for Ambari 1.5.0 release, potentially this week in the community, upgrade ambari to that version and it should be much easier.

    https://issues.apache.org/jira/browse/AMBARI-4212

    Collapse
    #50758

    Victor Chugunov
    Participant

    I set up ambari-server with -j option: ambari-server setup -j /usr/lib/jvm/jdk1.7.0_51.
    JAVA_HOME was set to /usr/lib/jvm/jdk1.7.0_51
    Ambari-server.properties looks like
    #
    #Thu Mar 27 22:31:28 PDT 2014
    server.connection.max.idle.millis=900000
    webapp.dir=/usr/lib/ambari-server/web
    metadata.path=/var/lib/ambari-server/resources/stacks
    server.fqdn.service.url=http://169.254.169.254/latest/meta-data/public-hostname
    bootstrap.dir=/var/run/ambari-server/bootstrap
    bootstrap.script=/usr/lib/python2.6/site-packages/ambari_server/bootstrap.py
    server.version.file=/var/lib/ambari-server/resources/version
    server.jdbc.database=ambari
    resources.dir=/var/lib/ambari-server/resources
    java.home=/usr/lib/jvm/jdk1.7.0_51
    api.authenticate=true
    jce_policy.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-6.zip
    server.os_type=redhat6
    server.persistence.type=local
    bootstrap.setup_agent.script=/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py
    server.jdbc.user.name=ambari
    server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
    jdk.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-6u31-linux-x64.bin
    ambari-server.user=root
    security.server.keys_dir=/var/lib/ambari-server/keys

    java.home in properties file point to the right settings, but all *-env.sh files contains line export JAVA_HOME=/usr/jdk/jdk1.6.0_31.
    Did I do something wrong? Should I file a JIRA ticket for this? How can I do a cluster setup with java 1.7 if -j option don’t work?

    Collapse
    #49005

    Tim Ellis
    Participant

    Here is a workaround.

    for i in cat hostList | xargs ; do
    echo “$i ==============” ;
    ssh root@$i “cd /var/lib/ambari-agent ;
    find . -type f -name ‘*.erb’ | fgrep ‘puppet’ | xargs sed -i -e ‘s-<%=scope.function_hdp_java_home()%>-/usr/java/default-’” ;
    done

    After you do this, restart your cluster. This may not work. This is what we’re trying right now.

    Collapse
    #41557

    Dave
    Moderator

    Hi,

    Ambari server should run with it’s downloaded JRE. Ensure your JAVA HOME is set correctly and that the JRE ambari-server.properties contains the correct JRE.

    Thanks

    Dave

    Collapse
Viewing 4 replies - 1 through 4 (of 4 total)