Support Questions

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

Ambari client install performs unwanted JDK updgrade

avatar
Expert Contributor

Building out a new cluster with Ambari 2.1 and using pre-installed JDK 1.7 (custom JDK option during setup). However, on the nodes where we install clients, it is automatically updating to 1.8. This does not happen on nodes where we do NOT install client (eg. Name nodes).

- Anyone hear of this???

1 ACCEPTED SOLUTION

avatar
Expert Contributor

I wanted to update this with the solution we arrived at. Very similar to answer by @Geoffrey Shelton Okot. Sqoop installs the MySql JDBC connector, which has a dependency to the OpenJdk version of Java. If you are using another JDK (like Oracle's) It thinks it is not there, so it goes ahead and installs OpenJdk.

The solution we arrived at was to pre-install the mysql connector from the HDP-UTILS repo, and then Sqoop will not try to reinstall.

/usr/bin/yum --disablerepo=* --enablerepo=HDP-UTILS* -d 0 -e 0 -y install mysql-connector-java

View solution in original post

5 REPLIES 5

avatar
Super Guru

Do you have JAVA_HOME configured in the environment for the user Ambari is using to install the software on the remote nodes?

avatar
Expert Contributor

When running ambari setup the java home was specified as /usr/java/latest, and this directory exists on each node pointing to Java 1.7.

avatar
Master Mentor

@jbarnett

I suspect the yum is updating the java try a simple trick add a line to /etc/yum.conf on the clients

exclude=j* 

... will exclude all packages starting with j. ( The wildcard ( * ) is usually a must.)

avatar
Expert Contributor

Some additional information - This only happens when installing the SQOOP client (put all the clients in one by one until Java got updated!)

Also tried removing Java 1.8 from the ambari-server.properties file, but no change in behaviour

Have not yet had time to try the yum.conf exclude statement, but will try today.

avatar
Expert Contributor

I wanted to update this with the solution we arrived at. Very similar to answer by @Geoffrey Shelton Okot. Sqoop installs the MySql JDBC connector, which has a dependency to the OpenJdk version of Java. If you are using another JDK (like Oracle's) It thinks it is not there, so it goes ahead and installs OpenJdk.

The solution we arrived at was to pre-install the mysql connector from the HDP-UTILS repo, and then Sqoop will not try to reinstall.

/usr/bin/yum --disablerepo=* --enablerepo=HDP-UTILS* -d 0 -e 0 -y install mysql-connector-java