Member since
03-29-2016
20
Posts
2
Kudos Received
0
Solutions
10-31-2016
05:26 PM
See response below
... View more
10-31-2016
05:26 PM
Sorry, I am not using a script, is there a default one? I just added the mysql accounts manually. Here is my configuration: The test connection works fine, but when I start ranger it fails with the message above? <screenshot removed>
... View more
10-31-2016
05:26 PM
You've been very helpful! I assume in the first section Log on to MySQL as ranger You actually meant: Log on to MySQL as rangeradmin Since this was the account created? Assuming this is what you meant, I followed the steps you suggested and created the database from here. When I restarted ranger the error was a bit different, so maybe this is progress. But the circular symlinks complaint is weird. Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 155, in <module>
RangerAdmin().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 75, in start
self.configure(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 102, in configure
ranger('ranger_admin', upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 41, in ranger
setup_ranger_admin(upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 55, in setup_ranger_admin
recursive = True
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 144, in action_create
raise Fail("Applying %s failed, looped symbolic links found while resolving %s" % (self.resource, path))
resource_management.core.exceptions.Fail: Applying Directory['/usr/hdp/current/ranger-admin/conf'] failed, looped symbolic links found while resolving /usr/hdp/current/ranger-admin/conf I tried your second suggestion and this was the result: [root@bu-hdp2-nn ranger-admin]# ./setup.sh
2016-10-27 09:01:51,841 --------- Running Ranger PolicyManager Web Application Install Script ---------
2016-10-27 09:01:51,843 [I] uname=Linux
2016-10-27 09:01:51,846 [I] hostname=nn.example.com
2016-10-27 09:01:51,852 [I] DB_FLAVOR=MYSQL
2016-10-27 09:01:51,853 [I] Checking distribution name..
2016-10-27 09:01:51,864 [I] Found distribution : CentOS
2016-10-27 09:01:51,866 [I] check if command /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java exists
2016-10-27 09:01:51,868 [I] '/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java' command found
2016-10-27 09:01:51,974 [I] Checking MYSQL CONNECTOR FILE : /usr/share/java/mysql-connector-java.jar
2016-10-27 09:01:51,976 [I] MYSQL CONNECTOR FILE : /usr/share/java/mysql-connector-java.jar file found
2016-10-27 09:01:51,978 [I] Setting up UNIX user : ranger and group: ranger
groupadd: group 'ranger' already exists
2016-10-27 09:01:52,001 [I] User already exists, adding it to group
usermod: no changes
2016-10-27 09:01:52,007 [I] Setting up UNIX user : ranger and group: ranger DONE
2016-10-27 09:01:52,008 [I] Setting up installation files and directory
2016-10-27 09:01:52,012 [I] Copying /usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/classes/conf.dist /usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/classes/conf
mkdir: cannot create directory `/usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/classes/conf': File exists
cp: accessing `/usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/classes/conf': Too many levels of symbolic links
2016-10-27 09:01:52,018 [I] Setting up init.d
2016-10-27 09:01:52,022 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc2.d directory ....
2016-10-27 09:01:52,027 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc3.d directory ....
2016-10-27 09:01:52,031 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc.d/rc2.d directory ....
2016-10-27 09:01:52,036 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc.d/rc3.d directory ....
2016-10-27 09:01:52,087 [I] Setting up installation files and directory DONE
2016-10-27 09:01:52,115 [I] /usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp folder found
2016-10-27 09:01:52,117 [I] db/mysql/xa_core_db.sql file found
2016-10-27 09:01:52,118 [I] Copying MYSQL Connector to /usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/lib
2016-10-27 09:01:52,124 [I] Copying MYSQL Connector to /usr/hdp/2.4.2.0-258/ranger-admin/ews/webapp/WEB-INF/lib DONE
2016-10-27 09:01:52,128 [I] check if command python exists
2016-10-27 09:01:52,130 [I] 'python' command found
2016-10-27 09:01:52,136 [E] 'setup_mode' not found in /usr/hdp/2.4.2.0-258/ranger-admin/install.properties file while getting....!!
2016-10-27 09:01:52,138 [I] Setup mode is not set. Running DBA steps..
2016-10-27 09:01:52,201 [I] Running DBA setup script. QuiteMode:True
2016-10-27 09:01:52,201 [I] Using Java:/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2016-10-27 09:01:52,201 [I] DB FLAVOR:MYSQL
2016-10-27 09:01:52,201 [I] DB Host:localhost
2016-10-27 09:01:52,202 [I] ---------- Verifing DB root password ----------
2016-10-27 09:01:52,202 [I] DBA root user password validated
2016-10-27 09:01:52,202 [I] ---------- Verifing Ranger Admin db user password ----------
2016-10-27 09:01:52,202 [E] Blank password is not allowed,please enter valid password. I certainly didn't set it blank in the first set of steps you gave. Must be using a different default?
... View more
10-31-2016
05:26 PM
Ok, I compared with another system and manually fixed the symlink: [root@bu-hdp2-nn ranger-admin]# ln -s /etc/ranger-admin/2.4.2.0-258/0 conf
[root@bu-hdp2-nn ranger-admin]# ls -l conf
lrwxrwxrwx. 1 root root 31 Oct 27 15:36 conf -> /etc/ranger-admin/2.4.2.0-258/0 Now when I restart the error is different: stderr: /var/lib/ambari-agent/data/errors-1154.txt
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 155, in <module>
RangerAdmin().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 75, in start
self.configure(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 102, in configure
ranger('ranger_admin', upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 41, in ranger
setup_ranger_admin(upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 80, in setup_ranger_admin
Execute(db_connection_check_command, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, environment=env_dict)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
result = function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
tries=tries, try_sleep=try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/jdk64/jdk1.8.0_60/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/ews/lib/* org.apache.ambari.server.DBConnectionVerification 'jdbc:mysql://nn.example.com/rangerdb' ranger [PROTECTED] com.mysql.jdbc.Driver' returned 1. ERROR: Unable to connect to the DB. Please check DB connection properties.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'ranger'@'nn.example.com' to database 'rangerdb' I was sure I had set the password correctly, it works here: [root@bu-hdp2-nn ranger-admin]# mysql -u ranger -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 151
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases
-> ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hive |
| mysql |
| ranger |
| rangerdb |
+--------------------+
5 rows in set (0.00 sec) Not sure why I would see access denied?
... View more
10-31-2016
05:26 PM
Sorry about the spam, made it a bit further on my own: mysql> GRANT ALL PRIVILEGES ON rangerdb.* TO ranger@nn.example.com IDENTIFIED BY 'rangerdba';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-nn.example.com IDENTIFIED BY 'rangerdba'' at line 1
mysql> GRANT ALL PRIVILEGES ON rangerdb.* TO 'ranger'@'nn.example.com' IDENTIFIED BY 'rangerdba'; Query OK, 0 rows affected (0.00 sec) It now only fails to start the last component: stderr: /var/lib/ambari-agent/data/errors-1160.txt
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 78, in <module>
RangerUsersync().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 50, in start
self.configure(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 44, in configure
ranger('ranger_usersync', upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 44, in ranger
setup_usersync(upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 336, in setup_usersync
owner = params.unix_user
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 156, in action_create
raise Fail("Applying %s failed, parent directory %s doesn't exist" % (self.resource, dirname))
resource_management.core.exceptions.Fail: Applying Directory['/usr/hdp/current/ranger-usersync/conf/'] failed, parent directory /usr/hdp/current/ranger-usersync/conf doesn't exist Need to understand why the directory it is looking for doesn't exist, and what I need to do to recreate it.
... View more
10-31-2016
05:26 PM
Thanks for continuing to look at this. I think I am almost there, although it's been painful. [root@bu-hdp2-nn ranger-admin]# hostname -f
nn.example.com
[root@bu-hdp2-nn ranger-admin]# mysql -u ranger -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 166
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show grants;
+------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for ranger@localhost |
+------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' IDENTIFIED BY PASSWORD 'xxxxxxxxx' WITH GRANT OPTION |
+------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> quit
Bye
[root@bu-hdp2-nn ranger-admin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 168
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use rangerdb;
Database changed
mysql> GRANT ALL PRIVILEGES ON * . * TO 'ranger'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> Flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@bu-hdp2-nn ranger-admin]#
... View more
10-31-2016
05:26 PM
Ok, I did everything: [root@bu-hdp2-nn ranger-admin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 170
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.' at line 1
mysql> GRANT ALL PRIVILEGES ON rangerdb TO 'ranger'@'nn.example.com' IDENTIFIED BY 'rangerdba';
ERROR 1046 (3D000): No database selected
mysql> use rangerdb;
Database changed
mysql> GRANT ALL PRIVILEGES ON rangerdb TO 'ranger'@'nn.example.com' IDENTIFIED BY 'rangerdba';
Query OK, 0 rows affected (0.02 sec)
mysql> show grants
-> ;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD 'xxxxxxxxx' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> quit
Bye I still have that last problem: Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 78, in <module>
RangerUsersync().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 50, in start
self.configure(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py", line 44, in configure
ranger('ranger_usersync', upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 44, in ranger
setup_usersync(upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 336, in setup_usersync
owner = params.unix_user
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 156, in action_create
raise Fail("Applying %s failed, parent directory %s doesn't exist" % (self.resource, dirname))
resource_management.core.exceptions.Fail: Applying Directory['/usr/hdp/current/ranger-usersync/conf/'] failed, parent directory /usr/hdp/current/ranger-usersync/conf doesn't exist [root@bu-hdp2-nn ranger-usersync]# ls -l /usr/hdp/current/ranger-usersync/conf
lrwxrwxrwx. 1 root root 25 Oct 25 09:55 /usr/hdp/current/ranger-usersync/conf -> /etc/ranger/usersync/conf
[root@bu-hdp2-nn ranger-usersync]# ls -l /etc/ranger/usersync/conf
lrwxrwxrwx. 1 ranger ranger 37 Sep 1 13:54 /etc/ranger/usersync/conf -> /usr/hdp/current/ranger-usersync/conf
[root@bu-hdp2-nn ranger-usersync]# ls -l /usr/hdp/current/ranger-usersync/conf
lrwxrwxrwx. 1 root root 25 Oct 25 09:55 /usr/hdp/current/ranger-usersync/conf -> /etc/ranger/usersync/conf Wow, more circular symlinks! I'm not sure how my ranger install got itself so borked.
... View more
10-31-2016
05:26 PM
@bhagan: Thanks for your response! [root@bu-hdp2-nn ~]# ls -la /usr/bin/ranger-admin-stoplrwxrwxrwx. 1 root root 51 Jun 14 15:42 /usr/bin/ranger-admin-stop -> /usr/hdp/current/ranger-admin/ews/ranger-admin-stop[root@bu-hdp2-nn ~]
# ls -la /usr/hdp/current/ranger-admin/ews/ranger-admin-stoplrwxrwxrwx. 1 root root 58 Oct 25 09:54 /usr/hdp/current/ranger-admin/ews/ranger-admin-stop -> /usr/hdp/2.4.2.0-258/ranger-admin/ews/stop-ranger-admin.sh Everything looks ok to me from here...
... View more
10-31-2016
05:26 PM
1 Kudo
I manually fixed the symlink by looking at another working cluster. No idea how or why it got confused like that. [root@bu-hdp2-nn ranger-usersync]# ln -s /etc/ranger-usersync/2.4.2.0-258/0 conf[root@bu-hdp2-nn ranger-usersync]# ls -l conflrwxrwxrwx. 1 root root 34 Oct 28 10:35 conf -> /etc/ranger-usersync/2.4.2.0-258/0[root@bu-hdp2-nn ranger-usersync]# pwd/usr/hdp/current/ranger-usersync And Ranger services seem to running now.
... View more
10-31-2016
05:26 PM
Ok, I seem to have hive up and running with mysql, but now I cannot get ranger admin to start: stderr: /var/lib/ambari-agent/data/errors-1023.txt
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 155, in <module>
RangerAdmin().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 512, in restart
self.stop(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 54, in stop
Execute(format('{params.ranger_stop}'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
result = function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
tries=tries, try_sleep=try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/bin/ranger-admin-stop' returned 126. -bash: /usr/bin/ranger-admin-stop: Permission denied
=============================
stdout: /var/lib/ambari-agent/data/output-1023.txt
2016-10-25 10:58:39,550 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.4.2.0-258
2016-10-25 10:58:39,550 - Checking if need to create versioned conf dir /etc/hadoop/2.4.2.0-258/0
2016-10-25 10:58:39,550 - call['conf-select create-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1}
2016-10-25 10:58:39,587 - call returned (1, '/etc/hadoop/2.4.2.0-258/0 exist already', '')
2016-10-25 10:58:39,588 - checked_call['conf-select set-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False}
2016-10-25 10:58:39,616 - checked_call returned (0, '')
2016-10-25 10:58:39,616 - Ensuring that hadoop has the correct symlink structure
2016-10-25 10:58:39,617 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2016-10-25 10:58:39,736 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.4.2.0-258
2016-10-25 10:58:39,736 - Checking if need to create versioned conf dir /etc/hadoop/2.4.2.0-258/0
2016-10-25 10:58:39,737 - call['conf-select create-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1}
2016-10-25 10:58:39,763 - call returned (1, '/etc/hadoop/2.4.2.0-258/0 exist already', '')
2016-10-25 10:58:39,764 - checked_call['conf-select set-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False}
2016-10-25 10:58:39,791 - checked_call returned (0, '')
2016-10-25 10:58:39,792 - Ensuring that hadoop has the correct symlink structure
2016-10-25 10:58:39,792 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2016-10-25 10:58:39,794 - Group['kms'] {}
2016-10-25 10:58:39,795 - Group['spark'] {}
2016-10-25 10:58:39,796 - Group['ranger'] {}
2016-10-25 10:58:39,797 - Group['hadoop'] {}
2016-10-25 10:58:39,797 - Group['users'] {}
2016-10-25 10:58:39,800 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,801 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,802 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,803 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['ranger']}
2016-10-25 10:58:39,804 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2016-10-25 10:58:39,804 - User['kms'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,805 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,806 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2016-10-25 10:58:39,807 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,808 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,809 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,809 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,810 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2016-10-25 10:58:39,811 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2016-10-25 10:58:39,814 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2016-10-25 10:58:39,819 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if
2016-10-25 10:58:39,820 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'recursive': True, 'mode': 0775, 'cd_access': 'a'}
2016-10-25 10:58:39,821 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2016-10-25 10:58:39,822 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'}
2016-10-25 10:58:39,827 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] due to not_if
2016-10-25 10:58:39,828 - Group['hdfs'] {}
2016-10-25 10:58:39,828 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hadoop', 'hdfs']}
2016-10-25 10:58:39,829 - FS Type:
2016-10-25 10:58:39,829 - Directory['/etc/hadoop'] {'mode': 0755}
2016-10-25 10:58:39,847 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2016-10-25 10:58:39,848 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 0777}
2016-10-25 10:58:39,863 - Execute[('setenforce', '0')] {'not_if': '(! which getenforce ) || (which getenforce && getenforce | grep -q Disabled)', 'sudo': True, 'only_if': 'test -f /selinux/enforce'}
2016-10-25 10:58:39,881 - Directory['/var/log/hadoop'] {'owner': 'root', 'mode': 0775, 'group': 'hadoop', 'recursive': True, 'cd_access': 'a'}
2016-10-25 10:58:39,883 - Directory['/var/run/hadoop'] {'owner': 'root', 'group': 'root', 'recursive': True, 'cd_access': 'a'}
2016-10-25 10:58:39,883 - Directory['/tmp/hadoop-hdfs'] {'owner': 'hdfs', 'recursive': True, 'cd_access': 'a'}
2016-10-25 10:58:39,889 - File['/usr/hdp/current/hadoop-client/conf/commons-logging.properties'] {'content': Template('commons-logging.properties.j2'), 'owner': 'hdfs'}
2016-10-25 10:58:39,891 - File['/usr/hdp/current/hadoop-client/conf/health_check'] {'content': Template('health_check.j2'), 'owner': 'hdfs'}
2016-10-25 10:58:39,892 - File['/usr/hdp/current/hadoop-client/conf/log4j.properties'] {'content': ..., 'owner': 'hdfs', 'group': 'hadoop', 'mode': 0644}
2016-10-25 10:58:39,909 - File['/usr/hdp/current/hadoop-client/conf/hadoop-metrics2.properties'] {'content': Template('hadoop-metrics2.properties.j2'), 'owner': 'hdfs', 'group': 'hadoop'}
2016-10-25 10:58:39,910 - File['/usr/hdp/current/hadoop-client/conf/task-log4j.properties'] {'content': StaticFile('task-log4j.properties'), 'mode': 0755}
2016-10-25 10:58:39,911 - File['/usr/hdp/current/hadoop-client/conf/configuration.xsl'] {'owner': 'hdfs', 'group': 'hadoop'}
2016-10-25 10:58:39,917 - File['/etc/hadoop/conf/topology_mappings.data'] {'owner': 'hdfs', 'content': Template('topology_mappings.data.j2'), 'only_if': 'test -d /etc/hadoop/conf', 'group': 'hadoop'}
2016-10-25 10:58:39,922 - File['/etc/hadoop/conf/topology_script.py'] {'content': StaticFile('topology_script.py'), 'only_if': 'test -d /etc/hadoop/conf', 'mode': 0755}
2016-10-25 10:58:40,092 - Execute['/usr/bin/ranger-admin-stop'] {'environment': {'JAVA_HOME': '/usr/jdk64/jdk1.8.0_60'}, 'user': 'ranger'} I created the database and user accounts in mysql it needs, but I don't see why it would give a "permission denied" error attempting to stop ranger-admin. I tried running the script manually from the root account, to no avail.
... View more
Labels:
10-27-2016
04:45 PM
On again, off again... I managed to fix my mysql install: CREATE USER 'hive'@'%' IDENTIFIED BY 'passwd';
GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%';
... View more
10-27-2016
03:30 PM
Ok, this is unbelievably maddening - hive was only working because it somehow reverted back to postgres datastore, I only discovered this now. When I switched it back to use mysql things started failing again! Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 245, in <module>
HiveMetastore().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
self.start(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 58, in start
self.configure(env)
File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 72, in configure
hive(name = 'metastore')
File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
return fn(*args, **kwargs)
File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 296, in hive
user = params.hive_user
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
result = function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
tries=tries, try_sleep=try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-metastore/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED]' returned 1. WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL: jdbc:mysql://bu-hdp2-sn.lss.emc.com/hive?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed *** I tried to fix things with the schema tool, it won't let me: [root@bu-hdp2-nn /]# /usr/hdp/current/hive-metastore/bin/schematool -dbType mysql -initSchema
WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL: jdbc:mysql://bu-hdp2-sn.lss.emc.com/hive?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed ***
... View more
10-25-2016
01:36 PM
I assume the one bit below is a typo? Anyway, I was eventually able to get it going after some more fiddling and restarts with ambari. I also uninstalled and reinstalled hive. Thanks for your suggestions! mysql -u root -hive
... View more
10-24-2016
03:10 PM
Thanks for the fast response! Unfortunately, it didn't help: [root@bu-hdp2-nn /]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jarUsing python /usr/bin/pythonSetup ambari-serverCopying /usr/share/java/mysql-connector-java.jar to /var/lib/ambari-server/resourcesJDBC driver was successfully initialized.Ambari Server 'setup' completed successfully.
[root@bu-hdp2-nn /]# tail -20 /var/log/ambari-server/ambari-server.log
24 Oct 2016 09:43:30,369 INFO [qtp-ambari-client-28805] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,541 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,543 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,545 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,548 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,550 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,553 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,555 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,558 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,561 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,563 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,565 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,566 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,568 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,570 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,572 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,573 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,575 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,577 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com
24 Oct 2016 09:43:36,579 INFO [qtp-ambari-client-22] AbstractProviderModule:354 - Metrics Collector Host or host component not live : bu-hdp2-sn.lss.emc.com Do I need to enable this service somehow to test the database connection when setting up hive? Test connection still fails with exactly the same error.
... View more
10-24-2016
02:41 PM
I ran the setup script, which apparently was ok. ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
Using python /usr/bin/python
Setup ambari-server
Copying /usr/share/java/mysql-connector-java.jar to /var/lib/ambari-server/resources
JDBC driver was successfully initialized.
Ambari Server 'setup' completed successfully. mysql has been set up with a hive account using the recommended approach: # mysql -u root -p CREATE USER ‘<HIVEUSER>’@’localhost’ IDENTIFIED BY ‘<HIVEPASSWORD>’; GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'localhost'; CREATE USER ‘<HIVEUSER>’@’%’ IDENTIFIED BY ‘<HIVEPASSWORD>’; GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'%'; CREATE USER '<HIVEUSER>'@'<HIVEMETASTOREFQDN>'IDENTIFIED BY '<HIVEPASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'<HIVEMETASTOREFQDN>'; FLUSH PRIVILEGES; But when I go to add the hive service from ambari (I set the metastore to be on the secondary namenode) and test the connection: Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 477, in <module>
CheckHost().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 212, in actionexecute
raise Fail(error_message)
resource_management.core.exceptions.Fail: Check db_connection_check was unsuccessful. Exit code: 1. Message: Error: Ambari Server cannot download the database JDBC driver and is unable to test the database connection. You must run ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/your/mysql/driver.jar on the Ambari Server host to make the JDBC driver available for download and to enable testing the database connection.
HTTP Error 404: Not Found
stdout:
DB connection check started.
WARNING: File /var/lib/ambari-agent/cache/DBConnectionVerification.jar already exists, assuming it was downloaded before
Error: Ambari Server cannot download the database JDBC driver and is unable to test the database connection. You must run ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/your/mysql/driver.jar on the Ambari Server host to make the JDBC driver available for download and to enable testing the database connection.
HTTP Error 404: Not Found I entered in the correct password at the prompt for the hive account I created on mysql, but I keep getting this error. What step could I be missing?
... View more
Labels:
07-28-2016
12:35 PM
Interesting, I was seeing significant speedups even with maps running symmetrical data nodes. So the only downside is the initial setup time is greater with dynamic strategy.
... View more
07-27-2016
08:09 PM
We did some preliminary tests and it seems distcp with -strategy dynamic improves performance by a substation amount on our workload. Digging through what documentation I can find, it does say that it improves performance with MOST workloads, but I can't find any clear guidance on what workloads it would perform poorly with. 1. If it is so much better in most situations, why isn't -strategy dynamic the Hadoop default? 2. What are the potential downsides to using it by default? Is there any use case where -strategy uniform would perform better?
... View more
Labels:
04-22-2016
07:23 PM
Actually, I checked that ExportSnapshot includes the Tools interface, hence it does support -files and -libjars so I think the approach is still good. Sorry, false panic.
... View more
04-21-2016
06:53 PM
Sorry, one related problem, can ExportSnapshot be passed an external
.jar and
library files using -files and -libjars to support the external
filesystem as can be done with DistCp?If not, is there any other way to
make ExportSnapshot work if the DistCp operation needs an external .jar
and libraries?
... View more
03-29-2016
09:47 PM
1 Kudo
I would like to export HBase snapshot data to a backup appliance outside of hdfs for disaster recovery. I can use ExportSnapshot to export the table to a non hdfs URI, no problem. But there is no ImportSnapshot - if I try to use ExportSnapshot to bring it back from the external source outside the cluster, using --copy-from <Backup-appliance-URI>/hbase and --copy-to /hbase complains about an unexpected (non hdfs) URI. If I use DistCp to copy it to a staging area on the hdfs cluster first then use ExportSnapshot to bring it back it works but is undesirable because I need to create a temporary staging area. I found I was able to use DistCp directly on the exported snapshot and copy it back to hdfs://hbase and restore the table. This looks like a good solution and seems to work, but are there any unexpected problems I can run into? Is this a recommended approach?
... View more