Created 07-06-2016 04:05 PM
While trying out the sandbox 2.5 TP for some new features in Atlas, I encountered an error when running sqoop cmd to move data from mySQL to Hive (this should trigger a linage generated inside Atlas and that is my goal)
created a simple table inside mysql and then sqoop the data under ambari-qa credential
mysql --host=sandbox.hortonworks.com --user=root --database=hive use test; create table source_fact (id int, name varchar(100), description varchar(100)); exit; sqoop import --connect jdbc:mysql://sandbox.hortonworks.com:3306/test --table source_fact --hive-import --hive-overwrite --hive-table atlasdemo.source_fact --username root -m 1
Then got the following error:
FAILED: RuntimeException java.io.FileNotFoundException: /etc/hive/2.5.0.0-817/0/xasecure-audit.xml (No such file or directory)
this only happens when running sqoop. Hive, Atals and Ranger all looks fine and function as expected.
Thanks,
Note: move this to security/Ranger, look like this is related to Ranger config after looking at some old thread. And based on the old thread, xasecure-audit.xml should not be part of the new version anyway. Looking for some Ranger guru to provide some feedbacks.
Created 07-09-2016 10:43 AM
Hi @Qi Wang, there is a bug from Ambari perspective, it is not generating hiveserver2-site.xml. So any changes made in Advanced Hiveserver2 site section from Ambari are not getting reflected, (we make changes in hiveserver2-site.xml for Ranger) so if you disable authorization from the general settings as mentioned above, your Ranger policies will not work as expected. This issue has been raised up and will be resolved soon in the upcoming releases of Sandbox.
Created 07-06-2016 06:16 PM
A quick workaround is to disable ranger authorization from hive->authorization in ambari UI and restart hive. However, if ranger is part of your tests and want to keep it enabled, this is not the solution.
Created 07-06-2016 09:11 PM
Ravi, I want to take a look of Atlas/Ranger integration in HDP2.5. So disable Ranger is not really an option.
Created 07-06-2016 09:58 PM
Hi @Qi Wang
Which user is running the sqoop command? Can you verify file /etc/hive/2.5.0.0-817/0/xasecure-audit.xml exists? Does the user running sqoop import has read access to this file? Also, check the following link. It might be your issue.
Created 07-06-2016 10:01 PM
I tried different users running sqoop cmd and none worked, including root, ambari-qa, sqoop, hive...
the file /etc/hive/2.5.0.0-817/0/xasecure-audit.xml does not exist. And I did a search of all folders and it doesn't exist on the sandbox VM
cd / find -name xasecure-audit.xml
Created 07-06-2016 10:02 PM
Check the link I just added to my answer.
Created 07-07-2016 02:12 AM
I tried the suggested fix in the old thread and it is not working. Still got the same error with sqoop. Move this to ranger section and hoping some ranger guru jump in.
Thanks for your help
Created 07-09-2016 10:43 AM
Hi @Qi Wang, there is a bug from Ambari perspective, it is not generating hiveserver2-site.xml. So any changes made in Advanced Hiveserver2 site section from Ambari are not getting reflected, (we make changes in hiveserver2-site.xml for Ranger) so if you disable authorization from the general settings as mentioned above, your Ranger policies will not work as expected. This issue has been raised up and will be resolved soon in the upcoming releases of Sandbox.
Created 07-12-2016 12:56 PM
this is a misguided exception , can you please check /etc/hive/conf/conf.server , whether ranger-audit.xml is present there ?
Created 07-12-2016 09:25 PM
under /etc/hive/conf/conf.server, following ranger files are there, but not ranger-audit.xml
-rwxr--r-- 1 hive hadoop 1208 2016-06-25 16:25 /etc/hive/conf/conf.server/ranger-hive-audit.xml -rwxr--r-- 1 hive hadoop 1072 2016-06-25 16:25 /etc/hive/conf/conf.server/ranger-hive-security.xml -rwxr--r-- 1 hive hadoop 1030 2016-06-25 16:25 /etc/hive/conf/conf.server/ranger-policymgr-ssl.xml -rw-r--r-- 1 hive hadoop 64 2016-06-26 21:39 /etc/hive/conf/conf.server/ranger-security.xml