Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Does Ranger 0.5 work without Solr?

Highlighted

Does Ranger 0.5 work without Solr?

New Contributor

Hi, Currently I am working with HDP 2.3 and Ranger 0.5. I want to install hdfs plugin on the namenode so that I can see the audit logs in Ranger UI. I also see this message:"Ranger Plugin for hadoop has been enabled. Please restart hadoop to ensure that changes are effective." But, I am not able to see any plugin in audits->plugins. I am not able to see any logs also in the UI. What can be the issue? Is it necessary to have Solr? Or the audits can also be saved in the DB as in Ranger 0.4?

15 REPLIES 15

Re: Does Ranger 0.5 work without Solr?

Expert Contributor

Ranger works fine without solr.

You can save Ranger audit on HDFS as well as DB.

Re: Does Ranger 0.5 work without Solr?

New Contributor

@Rahul Pathak: Ok. Thanks

Re: Does Ranger 0.5 work without Solr?

Expert Contributor

Please accept best answer.

Also do comment if you need additional details.

Re: Does Ranger 0.5 work without Solr?

New Contributor

@Rahul Pathak: Actually I still face the same problem. I am not able to view the audit logs in the UI. In ranger-admin->install.properties, this property is set "audit_store=db". This means logs are stored in db. I also found out that ranger-kms service has to be installed. I referred: https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.5.0+Installation#ApacheRanger0.5.... and https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.2/bk_Ranger_KMS_Admin_Guide/content/ch_ranger...

So, I want to know isw this necessary for getting audit logs? Is this the issue? Please provide your suggestions.

Re: Does Ranger 0.5 work without Solr?

Expert Contributor

I have HDP 2.3.4 and Ranger 0.5

I have enabled only Audit to HDFS and it is working fine. Ensure that Destination HDFS Directory is set correctly.

However I have read somewhere that HDP2.3 onwards need solr for storing ranger audits. So even I am confused now. Anyway Solr is recommended for storing audits.

Re: Does Ranger 0.5 work without Solr?

New Contributor

Hi, @Rahul Pathak Thanks for your reply. Could you tell me what did you do for enabling Audit to HDFS?

Re: Does Ranger 0.5 work without Solr?

Hi @Pooja Kamle

You can use Audit to DB instead of solr in HDP2.3 and Ranger 0.5.

Click on Services->Ranger->Configs->Advance-> search here for "Audit to DB"

Note: you need to make sure you have the below property set as shown -

ranger.audit.source.type=db

There is no plugin required for audit.

Let me know if it works for you.

Re: Does Ranger 0.5 work without Solr?

New Contributor

@Sagar Shimpi :Thanks for your reply. I checked this property- ranger.audit.source.type=db, it is set to db only. Still I cant see any audit logs.

Re: Does Ranger 0.5 work without Solr?

@Pooja Kamle - use following steps to debug the issue -

  1. Login to ranger UI. Click on "Audit" -> "Plugins".Here make sure you see hdfs as service name with "Http Response Code" column shows status as 200. This means your plugin for hdfs is property working with Ranger.
  2. In RangerUI click on "Access Manager" -> "edit HDFS repository" - try "Test Connection". Make sure this repository test connection shows "Connected Successfully"
  3. If possible can you attached - /var/log/ranger/admin/xa_portal.log and namenode logs to debug the issue.
Don't have an account?
Coming from Hortonworks? Activate your account here