Support Questions

Find answers, ask questions, and share your expertise

Ranger Audits are not displayed while using solr

avatar
Expert Contributor

Problem Statement : We recently upgraded our AMbari and HDP to latest version.

As pre-requisites while ambari upgrade we missed to upgrade ambari-infra rpm/package.

We did HDP upgrade and realized as ambari-infra was not upgraded. So we upgraded ambari-infra package on respective node.

When checking in Ranger UI, I am not able to see ranger audits and its giving error -

2018-09-03 12:47:06,891 [http-bio-6080-exec-18] ERROR org.apache.ranger.solr.SolrUtil (SolrUtil.java:161) - Error running solr query. Query = q=*:*&fq=evtTime:[2018-09-02T16:00:00Z+TO+NOW]&sort=evtT
ime+desc&start=0&rows=25&_stateVer_=ranger_audits:542, response = null
2018-09-03 12:47:06,892 [http-bio-6080-exec-18] INFO  org.apache.ranger.common.RESTErrorUtil (RESTErrorUtil.java:63) - Request failed. loginId=admin, logMessage=Error running solr query, please chec
k solr configs. Could not find a healthy node to handle the request.
javax.ws.rs.WebApplicationException

Can you help to resolve this issue.

Attached xa_portal.logxa-portal.txt

2 REPLIES 2

avatar
Expert Contributor

@Sagar Shimpi

1) Verify whether solr application is running.

2) If Solr is running and still you are facing the issue. You can run below command to delete ranger_audit collection from solr

# curl -iv --negotiate -u: 'http://$SOLR_HOST:8886/solr/admin/collections?action=DELETE&name=ranger_audits'

This command will delete ranger_audits collection data from solr.

3) Restart ranger service from ambari. This will create a new ranger_audit collection automatically

avatar
Expert Contributor

I tried below process and it worked -

  1. Stop AMS
  2. Moved contents of AMS "tmp.dir" to backup
  3. Moved contents of AMS "root.dir" to backup
  4. removed ams znode from zookeeper
  5. started AMS

AMS is working fine now.