简体   繁体   中英

Setting up Solr with Jetty issue on Centos 6

Here are the steps made:

1 Got Solr:

wget http://my.mirror.com/apache.org/lucene/solr/4.6.1/solr-4.6.1.tgz

  1. Unziped in /root/solr/

  2. Installed jetty 6:

Step 1 : Enable the jpackage repo Download the jpackage.repo file to your /etc/yum.repos.d/ directory.

cd /etc/yum.repos.d/

wget http://jpackage.org/jpackage50.repo

Step 2 : Install the jetty package you want

yum search jetty will show you a list of jetty packages you want to install. At the time of writing you get 2 options - jetty 5 and

jetty 6. We installed jetty 6.

yum install jetty6

  1. Copied /example/solr to /home/solr
  2. Copied /example/solr/contexts to /usr/share/jetty6/contexts
  3. Copied /dist/solr.war to /usr/share/jetty6/webapps

  4. Copied start.jar in my /home/solr directory

  5. Switched to the above directory and ran:

java -Dsolr.solr.home=/home/solr -jar start.jar

Got the exception:

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

Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information

Any idea why?

if you are going to use jetty, I think you are better off using the version that comes bundled with solr.

Just follow the example/README.txt and you will start solr with bundled jetty (it is jetty8 btw). Advantages are that it is properly tunned/configured for Solr, and it is the most used container for Solr in my experience.

2nd to @Persimmonium as there might be more things to check if start from scratch.

On the other hand, just trying to address the exception as you saw, likely the "-Djetty.home" need to be configured (to the dir that has lib, etc dirs for holding jetty libs/configurations. The default is . or ..

Reference 1

Also the Solr 4.6 has been tested with jetty8 . It's not clear if jettey6+Solr4.6 will work out of the box. It would be interesting to learn that from your experiment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM