Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-6082

ambari-server setup does not check that custom jdk path is jdk

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.6.1
    • ambari-agent
    • None

    Description

      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?

      [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.
      

      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?

      [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]# 
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vbrodetskyi Vitaly Brodetskyi
            vbrodetskyi Vitaly Brodetskyi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment