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

ambari-server reset doesn't work for MySQL as Ambari DB

    XMLWordPrintableJSON

Details

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

    Description

      STR:
      STR:
      1. Install and start MySQL server on first host of cluster.
      2. Create MySQL DB:

      mysql -u root
      CREATE DATABASE ambari;
      quit
      

      3. Create user and grant all privileges to him:

      mysql -u root
      CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'bigdata';
      GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'bigdata';
      FLUSH PRIVILEGES;
      quit
      

      4. Install Ambari server.
      5. Install mysql-connector-java.
      6. Perform "ambari-server setup".
      7. Perform "ambari-server reset -s --verbose".
      Actual result:

      Using python  /usr/bin/python2.6
      Resetting ambari-server
      INFO: about to run command: ps -p 13453
      **** WARNING **** You are about to reset and clear the Ambari Server database. This will remove all cluster host and configuration information from the database. You will be required to re-configure the Ambari server and re-run the cluster wizard. 
      Are you SURE you want to perform the reset [yes/no] (yes)? 
      Confirm server reset [yes/no](yes)? 
      Resetting the Server database...
      INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
      INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
      INFO: about to run command: type mysql
      INFO: about to run command: which mysql
      INFO: about to run command: type mysql
      INFO: about to run command: which mysql
      INFO: about to run command: /usr/bin/mysql --host=localhost --port=3306 --user=ambari --password=bigdata ambari -e"set @schema='ambari'; set @username='ambari'; source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-DROP.sql;"
      INFO: about to run command: type mysql
      INFO: about to run command: which mysql
      INFO: about to run command: /usr/bin/mysql --host=localhost --port=3306 --user=ambari --password=bigdata ambari -e"set @schema='ambari'; set @username='ambari'; source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;"
      INFO: about to run command: ps -p 13453
      Ambari Server 'reset' completed successfully.
      

      But next "ambari-server setup" fails with messages:

      ERROR 1050 (42S01) at line 29 in file: '/var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql': Table 'clusters' already exists
      ERROR: Database bootstrap failed. Please, provide correct connection properties.
      ERROR: Exiting with exit code 1. Reason: Error while configuring connection properties. Exiting
      

      Attachments

        1. AMBARI-4175.patch
          3 kB
          Vitaly Brodetskyi

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: