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

Solr not working


Solr not working




I have troubles creating my first collection within Apache Solr.

What I use is:

Version: Cloudera Enterprise Trial 4.8.1 (#74 built by jenkins on 20140130-0818 git: b86b260a322d131e5ff7e3aa62cb3b996f12198c)

SOLR 1.2.0-1.cdh4.5.0.p0.4


I use the Cloudera manager as a cluster & service installer. Within the Cloudera Manager all looks fine -- up and running without any errors. However, when I access HUE and click on the Solr I see the following message:


"There're currently no collections defined."

When I click on "Import" I receive the following:

All available collections from the Solr URL in hue.ini have been imported.

All available cores from the Solr URL in hue.ini have been imported.


Within the Cloudera Manager, Hue Configuration (View&Edit) I entered the following within the "Hue Server Configuration Safety Valve for hue_safety_valve_server.ini":

## URL of the Solr Server

However without any success, despite after that there's a checkbox with nothing as a description next to it appearing in "Import Collections and Cores" inside Hue, ready to be selected under the Collections option. Under the "Cores" it still shows "All available cores from the Solr URL in hue.ini have been imported."


When I access the Solr Admin interface at http://node1.cluster:8983/solr, clicking on "Core Admin/Add Core" just freezes (stays in "loading state"), once I push the "Add Core" button!


How do I create my first collection, I tried copying some example data under /var/lib/solr directory, however unsuccessfully. Also, I intend to use the HDFS to upload my collection into. What're the paths I should specify? I'll greatly appreciate any help!!







Re: Solr not working


Forgot the versions info:


  • solr-spec 4.4.0-search-1.2.0
  • solr-impl 4.4.0-search-1.2.0 exported - jenkins - 2014-02-24 13:41:51
  • lucene-spec 4.4.0-search-1.2.0
  • lucene-impl4.4.0-search-1.2.0 exported - jenkins - 2014-02-24 13:37:29
    • Args -Dcatalina.home=/opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/lib/bigtop-tomcat -Dcatalina.base=/opt/cloudera/parcels/SOLR-1.2.0-1.cdh4.5.0.p0.4/lib/solr/server -Djava.endorsed.dirs=/opt/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/lib/bigtop-tomcat/endorsed -Dsolr.solr.home=/var/lib/solr -Dsolr.admin.port=8984 -Dsolr.log=/var/log/solr -Dlog4j.configuration=file:///var/run/cloudera-scm-agent/process/397-solr-SOLR_SERVER/ -Dsolr.port=8983 -Djetty.port=8983 -Dhost=node1.cluster** -Dsolr.authentication.simple.anonymous.allowed=true -Dsolr.hdfs.confdir=/var/run/cloudera-scm-agent/process/397-solr-SOLR_SERVER/hadoop-conf -Dsolr.hdfs.home=hdfs://node1.cluster:8020/solr -Dsolr.solrxml.location=zookeeper -DzkHost=node2.cluster:2181,node3.cluster:2181,node1.cluster:2181/solr -Xmx1073741824 -Xms1073741824 -Dsolr.solr.home=/var/lib/solr -Dsolr.admin.port=8984 -Dsolr.log=/var/log/solr -Dlog4j.configuration=file:///var/run/cloudera-scm-agent/process/397-solr-SOLR_SERVER/ -Dsolr.port=8983 -Djetty.port=8983 -Dhost=node1.cluster** -Dsolr.authentication.simple.anonymous.allowed=true -Dsolr.hdfs.confdir=/var/run/cloudera-scm-agent/process/397-solr-SOLR_SERVER/hadoop-conf -Dsolr.hdfs.home=hdfs://node1.cluster:8020/solr -Dsolr.solrxml.location=zookeeper -DzkHost=node2.cluster:2181,node3.cluster:2181,node1.cluster:2181/solr -Xmx1073741824 -Xms1073741824 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/cloudera/parcels/SOLR-1.2.0-1.cdh4.5.0.p0.4/lib/solr/server/conf/

Re: Solr not working

Expert Contributor



Unfortunately there is no way to create a collection from the UI, it has to be done manually.  The steps are as follows:


- On any host running a solr instance run:


solrctl --zk zookeeper_host1:2181,zookeeper_host2:2181/solr instancedir --generate /path/to/configs


NOTE: /path/to/configs will be generated with example Solr configuratuions.  "--zk" should have every Zookeeper host in your cluster in a comma separated list, then "/solr" after the last entry.


- Then go to /path/to/configs/conf and check out the configs.  The main ones of interest are schema.xml and solrconfig.xml.

- Once you have changed the configs to meet your needs, run:


solrctl --zk zookeeper_host1:2181,zookeeper_host2:2181/solr instancedir --create <collection_name> /path/to/configs


- Then run:


solrctl --zk zookeer_host1:2181,zookeeper_host2:2181/solr collection --create <collection_name>


Then you will have a collection.  See the blog and doc link below for more details.


Hope this helps.



Re: Solr not working

Don't have an account?
Coming from Hortonworks? Activate your account here