Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56B5411F38 for ; Wed, 11 Jun 2014 15:28:04 +0000 (UTC) Received: (qmail 95090 invoked by uid 500); 11 Jun 2014 15:28:03 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 95072 invoked by uid 500); 11 Jun 2014 15:28:03 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 95024 invoked by uid 99); 11 Jun 2014 15:28:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2014 15:28:03 +0000 Date: Wed, 11 Jun 2014 15:28:03 +0000 (UTC) From: "Vitaly Brodetskyi (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AMBARI-6082) ambari-server setup does not check that custom jdk path is jdk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-6082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vitaly Brodetskyi resolved AMBARI-6082. --------------------------------------- Resolution: Fixed > ambari-server setup does not check that custom jdk path is jdk > -------------------------------------------------------------- > > Key: AMBARI-6082 > URL: https://issues.apache.org/jira/browse/AMBARI-6082 > Project: Ambari > Issue Type: Bug > Components: agent > Affects Versions: 1.6.1 > Reporter: Vitaly Brodetskyi > Assignee: Vitaly Brodetskyi > Fix For: 1.6.1 > > Attachments: AMBARI-6082.patch, AMBARI-6082_part2.patch > > > I just put in /tmp, which is a valid directory but not a java home, it goes thru. If I put in a bogus directory, it errors out (which is good). But if I put in a directory that does not contain java, it let's me continue. > I thought we had a check to 1) confirm it's a valid directory and 2) that it contains java? > {code} > [root@ip-10-146-183-28 yum.repos.d]# ambari-server setup > Using python /usr/bin/python2.6 > Setup ambari-server > Checking SELinux... > SELinux status is 'enabled' > SELinux mode is 'enforcing' > Temporarily disabling SELinux > WARNING: SELinux is set to 'permissive' mode and temporarily disabled. > OK to continue [y/n] (y)? > Customize user account for ambari-server daemon [y/n] (n)? > Adjusting ambari-server permissions and ownership... > Checking iptables... > Checking JDK... > [1] - Oracle JDK 1.7 > [2] - Oracle JDK 1.6 > [3] - Custom JDK > ============================================================================== > Enter choice (1): 3 > WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts. > WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts. > Path to JAVA_HOME: /tmp > Validating JDK on Ambari Server...done. > Completing setup... > Configuring database... > Enter advanced database configuration [y/n] (n)? ^C > Aborting ... Keyboard Interrupt. > {code} > Luckily, on ambari-server start, we give a clear error. Why don't we do this same check when they provide the path during setup to avoid finding this out during start? > {code} > [root@ip-10-146-183-28 yum.repos.d]# ambari-server start > Using python /usr/bin/python2.6 > Starting ambari-server > Looking for available JDKs at /usr/jdk64 > Found: [] > ERROR: Exiting with exit code 1. > REASON: No JDK found, please run the "ambari-server setup" command to install a JDK automatically or install any JDK manually to /usr/jdk64 > [root@ip-10-146-183-28 yum.repos.d]# > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)