Support Questions

Find answers, ask questions, and share your expertise

Ranger solr script create_ranger_audits_collection.sh missing

avatar
Master Guru

According to Ranger Solr install guide the script

/opt/lucidworks-hdpsearch/solr/ranger_audit_server/scripts/create_ranger_audits_collection.sh

Should be available for execution. This file does not exist. Where can I find this shell script to

create my solr collection?

1 ACCEPTED SOLUTION

avatar
Super Collaborator
6 REPLIES 6

avatar
Super Collaborator

avatar
Super Collaborator

Any luck with that @Sunile Manjee? It must have been moved from the install guide you are looking at. These instructions ^^^^ create a template and once you follow the instructions will create the script.

avatar
Super Collaborator

Hi @Sunile Manjee. That's weird. I just followed those instructions and it worked and all was there. I think you may have been looking at different instructions. It says to work with this directory: /usr/local/solr_for_audit_setup. Did your steps start with this?

wget https://issues.apache.org/jira/secure/attachment/12761323/solr_for_audit_setup_v3.tgz -O /usr/local/solr_for_audit_setup_v3.tgz

cd /usr/local
tar xvf solr_for_audit_setup_v3.tgz

cd /usr/local/solr_for_audit_setup

After editing the install.properties file, you run ./setup.sh and then execute this: /opt/solr/ranger_audit_server/scripts/add_ranger_audits_conf_to_zk.sh:

That just uploads the config set to Zookeeper.

The Create script you were looking for should be this one (not in the path you originally looked at): /opt/solr/ranger_audit_server/scripts/create_ranger_audits_collection.sh

Here is all that it does.

curl --negotiate -u : "${SOLR_HOST_URL}/solr/admin/collections?action=CREATE&name=${COLLECTION_NAME}&numShards=${SHARDS}&replicationFactor=${REPLICATION}&collection.configName=$CONF_NAME&maxShardsPerNode=100"

avatar
Master Guru

@james.jones I have done this twice during new cluster setup and both times the script does not exist in location you have identified. It is good to know what the script is doing which is a acceptable work around.

avatar
Super Collaborator

Really weird, but I'm glad you got it worked out. Cheers

avatar
Master Guru

@james.jones I followed those instructions during install and the script does not exist. Not sure why and if this is a bug. Eitherway I manually created a solr colleciton for the audit. Not sure what else the script did.