Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ranger audit with Solr doesn't work

avatar
Expert Contributor

I use HDP 2.6.3. I use Ranger. From Ranger UI once I click Audit I see the following ERROR.

Error running solr query, please check solr configs.Errorfrom server at http://hadooptest01.datalonga.com:8886/solr/ranger_audits: Expected mime type application/octet-stream but got text/html.

80496-ranger-audit-error-01.png

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Erkan ŞİRİN

Did you enable your plugin like below

80510-solr-config.jpg

I would advice you to restart the cluster it happened to me once that the audits ONLY popped up after the restart of cluster for reasons I don't know yet !

Make sure you see the entry in zookeeper too

View solution in original post

5 REPLIES 5

avatar

It might just be that there is no data yet to display. During your setup, did you run

/opt/solr/ranger_audit_server/scripts/create_ranger_audits_collection.sh 

[see also; https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.3/bk_security/content/solr_ranger_configure_solrcloud.html]

avatar
Expert Contributor

Hi @Jonathan Sneep I installed my cluster via Ambari so there is no such directory. I looked at ranger-admin directory all are .py script not .sh

avatar
Super Collaborator

@Erkan ŞİRİN

It looks that ranger_audits collection is not created. This is supposed to be created when Audit to solr is enabled in "Ranger Audit" Tab.

Ambari will create ranger_audits collection when ranger admin service is restarted with Audit to solr enabled.

Make sure that Infra-solr service is insatalled in cluster and "Audit to solr" and "Solr cloud" is enabled. Restart Ranger admin service, check the Ambari operation log for Ranger admin service start and see if ranger_audits collection is successfully created. You may need to troubleshoot solr if the create-collection fails with any error.

avatar
Expert Contributor

Thank you @rguruvannagari I just enabled SolrCloud and restarted. I don't see audit error anymore.

avatar
Master Mentor

@Erkan ŞİRİN

Did you enable your plugin like below

80510-solr-config.jpg

I would advice you to restart the cluster it happened to me once that the audits ONLY popped up after the restart of cluster for reasons I don't know yet !

Make sure you see the entry in zookeeper too