On 3/5/2013 2:17 PM, JW West wrote:
Hello,

I'm trying to set up Solr with a multi core configuration but I'm running
into troubles starting using start.jar.

Specifically, running java -jar start.jar inside of the example directory
works fine. However, I've created a new directory some place else with the
following:

solr.xml
core0/conf/schema.xml
core0/conf/solrconfig.xml
core1/conf/schema.xml
core1/conf/solrconfig.xml

When I run java -Dsolr.solr.home=$(my-project-dir) -jar $(brew --prefix
solr)/libexec/example/start.jar I get the following error:

java.io.FileNotFoundException: No XML configuration files specified in
start.config or command line.
at org.eclipse.jetty.start.Main.start(Main.java:506)
at org.eclipse.jetty.start.Main.main(Main.java:95)

You have to be concerned with two directory locations for solr when using the included jetty. One is jetty.home, which defaults to the current working directory, and the other is solr.solr.home, which tells Solr where solr.xml lives, and defaults to "./solr" if not supplied. You already seem to know about the latter, so I'll talk about the former first.

Withing jetty.home, you need start.jar, the lib directory, which contains all the jetty jars and the servlet API jar, and a contexts directory, which contains an XML file describing the Solr servlet. Here is an example of this file:

http://www.fpaste.org/6KVI/

With my example file, the solr.war will live in webapps under jetty.home, and it will be extracted to solr-webapp under jetty.home.

It looks like you aren't even getting Solr to start, and i'm guessing the context xml file is missing.

Once all that's figured out, Solr can start. Solr will look in solr.solr.home to find solr.xml. Inside solr.xml, the instanceDir setting for each core is relative to solr.solr.home, and that directory must contain a conf directory with the solrconfig and schema for that core. You can also specify a dataDir, which is relative to instanceDir, and defaults to "data" if it is not supplied. That directory will be created if it does not exist.

Thanks,
Shawn

Reply via email to