[ https://issues.apache.org/jira/browse/AMBARI-6082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vitaly Brodetskyi reopened AMBARI-6082: --------------------------------------- > 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 > > > 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)