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

Solr Configuration - Error uploading file

Solved Go to solution

Solr Configuration - Error uploading file

New Contributor

I am trying to install a basic instance of Atlas with embedded HBase and Solr.

I am following the installation guide: http://atlas.incubator.apache.org/InstallationSteps.html

In the section titled: Configuring SOLR as the Indexing Backend for the Graph Repository

I have Solr running in cloud mode with 1 node, sharding = 1 and replication =1 and a collection

Based on the tutorial I ran the following command:

 $SOLR_BIN/solr create -c vertex_index -d SOLR_CONF -shards #numShards -replicationFactor #replicationFactor

With ~numshards = 1 and replicationFactor =1, when I ran the command I got the following error.

9953-error-uploading-file.png

How to resolve this, any help will be highly appreciated.

Thanking you in anticipation.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Solr Configuration - Error uploading file

Super Collaborator

Your SOLR_CONF is pointing to the wrong directory. The directory you pointed to contains all of Solr including Jars, etc. You need to point to a directory that contains your conf directory. I'm short on time so I can't look for it now, but I it should be a directory with the file solrconfig.xml and schema.xml. Let me know if that helps or if you need more info.

7 REPLIES 7

Re: Solr Configuration - Error uploading file

Super Collaborator

Your SOLR_CONF is pointing to the wrong directory. The directory you pointed to contains all of Solr including Jars, etc. You need to point to a directory that contains your conf directory. I'm short on time so I can't look for it now, but I it should be a directory with the file solrconfig.xml and schema.xml. Let me know if that helps or if you need more info.

Re: Solr Configuration - Error uploading file

Super Collaborator

@Bilal Arshad - This should work. Here is what I did. Build:

export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=512m" && mvn clean install

I did not care about packaging above (mvn clean package -Pdist,external-hbase-solr ) but it should still work the same.

Now find the config files:

$ find . -name schema.xml
./distro/src/conf/solr/schema.xml
./distro/target/conf/solr/schema.xml

$ ls ./distro/src/conf/solr/
currency.xml   	lang   		protwords.txt  	schema.xml     	solrconfig.xml 	stopwords.txt  	synonyms.txt

Now create the collection:

$ solr create -c testAtlas -d /home/me/atlas/distro/target/conf/solr -shards 1 -replicationFactor 1 -p 8984
Connecting to ZooKeeper at localhost:9984
Uploading 

/home/me/atlas/distro/target/conf/solr for config testAtlas to ZooKeeper at localhost:9984

Creating new collection 'testAtlas' using command: http://HOSTNAME:8984/solr/admin/collections?action=CREATE&name=testAtlas&numShards=1&replicationFact... { "responseHeader":{ "status":0, "QTime":2691}, "success":{"":{ "responseHeader":{ "status":0, "QTime":2505}, "core":"testAtlas_shard1_replica1"}}}

Re: Solr Configuration - Error uploading file

Super Collaborator

@Bilal Arshad - It looks like your ..../solr-5.5.1/conf directory does not contain all of the config files. Make sure it contains solrconfig.xml along with schema.xml and the other config files for Solr. If that is not the case, then I suppose there could be a file/directory permission issue.

You should have all of these files in your conf directory:

├── currency.xml
├── lang
│   └── stopwords_en.txt
├── protwords.txt
├── schema.xml
├── solrconfig.xml
├── stopwords.txt
└── synonyms.txt

Re: Solr Configuration - Error uploading file

New Contributor

10012-file-does-contain.png

Thank you for the description.The above mentioned files already seem to be in the conf directory.

Re: Solr Configuration - Error uploading file

Super Collaborator

@Bilal Arshad Oh, I think I see the problem. Zookeeper already has some data under this configuration. Notice that it says, "re-using existing configuration directory vertex_index". That is probably from your earlier failed attempt when it failed on the jar file (binary files are not allowed). You have three options (maybe more), in this preferred order:

  1. Delete the data using Solr's zkcli.sh command --- ($SOLR_DIR/server/scripts/cloud-scripts/zkcli -zkhost localhost:9983 -cmd delete /config/vertext_index). Now you can create the collection -- I have not used this command in a while, but I think that is correct syntax. If this does not work, I'd just go for #2 since you don't have anything data in Solr to worry about.
  2. Delete ALL Zookeeper data --- Shutdown Solr. Delete ALL zookeeper data (find the directory Delete the zoo_data directory. Restart solr and create the collection.
  3. Leave the bad files in Zookeeper and use a different configName --- Add -n vertext_index2 to your command. This creates a new directory for configs. By default the configName is the same as your collection.

Re: Solr Configuration - Error uploading file

New Contributor

@james.jones I tried option number 2 and it did work. Thank you for your guidance and support! :)

Re: Solr Configuration - Error uploading file

New Contributor

@james.jones thank you for the correction. I tried pointing it to the directory you suggested but it gave me the following error:

9997-error.png