Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

SOLR / NIFI : How to resolve? bash: solr: command not found

avatar
Expert Contributor

Hi, I'm currently working on the following tutorial : http://hortonworks.com/hadoop-tutorial/how-to-refine-and-visualize-sentiment-data/ .

I was able to execute all the steps as listed until I reached the following statement. Also I'm unable to open http://sandbox.hortonworks.com:8983/solr/banana/index.html

Now we’re going to start Solr. Execute

/opt/lucidworks-hdpsearch/solr/bin/solr start -c -z localhost:2181
1 ACCEPTED SOLUTION

avatar
Master Mentor

you need to add java classpath. refer to the updated steps here https://community.hortonworks.com/content/kbentry/1282/sample-hdfnifi-flow-to-push-tweets-into-solrb... @keerthana gajarajakumar

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64/opt/lucidworks-hdpsearch/solr/bin/solr start -c -z localhost:2181 
/opt/lucidworks-hdpsearch/solr/bin/solr create -c tweets \   
-d data_driven_schema_configs \   
-s 1 \   
-rf 1 

View solution in original post

9 REPLIES 9

avatar
Master Mentor

you need to add java classpath. refer to the updated steps here https://community.hortonworks.com/content/kbentry/1282/sample-hdfnifi-flow-to-push-tweets-into-solrb... @keerthana gajarajakumar

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64/opt/lucidworks-hdpsearch/solr/bin/solr start -c -z localhost:2181 
/opt/lucidworks-hdpsearch/solr/bin/solr create -c tweets \   
-d data_driven_schema_configs \   
-s 1 \   
-rf 1 

avatar
Expert Contributor

Thanks Artem. It worked.

avatar
Master Mentor

@zblanco @Rafael Coss it makes sense to add java classpath to your tutorial as it's a common gotcha with new users. Please refer to the Ali Bajwa's tutorial where he addressed it with JAVA_HOME

avatar
Expert Contributor

avatar
Expert Contributor
@Neeraj Sabharwal

-- Any thoughts on this?

avatar
Master Mentor

do you have directory /opt/lucidworks-hdpsearch? Please refer to link I provided to install SOLR. On non Sandbox you have to install it. Just follow directions in the link, it was tested many times on latest sandbox.

  1. yum install -y lucidworks-hdpsearch
  2. sudo -u hdfs hadoop fs -mkdir /user/solr
  3. sudo -u hdfs hadoop fs -chown solr /user/solr

avatar
Expert Contributor

No issues with my Solr Artem. It's running fine. Thanks for your suggestions 🙂

avatar
Master Mentor

@keerthana gajarajakumar Hi Keerthana, I guess you have found the best answer. Please do let me know how can I help. Appreciate that you are using HCC

avatar
Expert Contributor

Thanks Neeraj. I got it solved for now. But as I learn more I'll definietly touch base with you 🙂