-->

DEVOPSZONES

  • Recent blogs

    KeyError: 'db_name': Ranger KMS server install on Ambari2.7.3

    KeyError: 'db_name': Ranger KMS server install on Ambari2.7.3 


    Hadoop Installation fails installing Ranger KMS server and subsequently the cluster installation fails. It gives following error:

    Please run 'ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc} on server host.'".format(params.db_flavor, params.jdk_location)
    KeyError: 'db_name'

    This is a database connection issue. First Impression is that we haven't set the database for rangerkms. But their could be different issues which might be causing this situation. Let's look into that:

    Install MySQL Connector:

    Check MySQL connector is installed or not. If not Install it.
    yum install mysql-connector-java -y

    Setup JDBC Driver:


    Setup the jdbc-driver for ambari-server.

    ambari-server setup --jdbc-db={db_name} --jdbc-driver={path_to_jdbc}

    Example:

    ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

    Login to MySQL:


    mysql -uroot -p{root_password}

    Create Database for rangerkms.


    create database rangerkms;

    Create "rangerkms" User:


    create user 'rangerkms'@'localhost' identified by '{rangerkms_password}';


    Give Following  permissions on "rangerkms" database for "rangerkms" user.


    grant all privileges on rangerkms.* to 'rangerkms'@'localhost';
    grant all privileges on rangerkms.* to 'rangerkms'@'%';
    grant all privileges on rangerkms.* to 'rangerkms'@'{DB_HOST}' identified by '{rangerkms_password}';
    grant all privileges on rangerkms.* to 'rangerkms'@'{DB_HOST}' with grant option;
    grant all privileges on rangerkms.* to 'rangerkms'@'%' with grant option;
    flush privileges;
    quit;

    No comments