0
votes

I'm running Jetty as a service (followed these instructions) on an Ubuntu 14 server. It's been configured to run on port 9000, and it seems to this just fine.

On the same server, I have a solr instance folder (it's located outside of jetty, as part of a website).

What I would like, is to be able to browse to hostname:9000/solr and hostname:9000/solr/admin and then see/manage the data that's in my solr instance folder, but all I ever get from the Jetty service are 404-errors.

The instance itself works perfectly if I start it manually by running 'java -Djetty.port=9000 -jar start.jar' - however, this is not what I want.

What do I need to do?

Edit: Here is the output from service jetty check

    root@ubuntu14:/opt/web/mybase/webapps# service jetty check
    Checking arguments to Jetty: 
    START_INI      =  /opt/web/mybase/start.ini
    JETTY_HOME     =  /opt/jetty/jetty-distribution-9.2.7.v20150116
    JETTY_BASE     =  /opt/web/mybase
    JETTY_CONF     =  /opt/jetty/jetty-distribution-9.2.7.v20150116/etc/jetty.conf
    JETTY_PID      =  /var/run/jetty.pid
    JETTY_START    =  /opt/jetty/jetty-distribution-9.2.7.v20150116/start.jar
    JETTY_LOGS     =  /opt/web/mybase/logs
    JETTY_STATE    =  /opt/web/mybase/jetty.state
    CLASSPATH      =  
    JAVA           =  /usr/bin/java
    JAVA_OPTIONS   =  -Dsolr.solr.home=/var/www/mywebsite/private/my-solr-4.7 -Djetty.logs=/opt/web/mybase/logs -Djetty.home=/opt/jetty/jetty-distribution-9.2.7.v20150116 -Djetty.base=/opt/web/mybase -Djava.io.tmpdir=/opt/jetty/temp
    JETTY_ARGS     =  jetty.state=/opt/web/mybase/jetty.state jetty-logging.xml jetty-started.xml
    RUN_CMD        =  /usr/bin/java -Dsolr.solr.home=/var/www/mywebsite/private/my-solr-4.7 -Djetty.logs=/opt/web/mybase/logs -Djetty.home=/opt/jetty/jetty-distribution-9.2.7.v20150116 -Djetty.base=/opt/web/mybase -Djava.io.tmpdir=/opt/jetty/temp -jar /opt/jetty/jetty-distribution-9.2.7.v20150116/start.jar jetty.state=/opt/web/mybase/jetty.state jetty-logging.xml jetty-started.xml

    Jetty running pid=4728
1

1 Answers

0
votes

First make sure you have deployed the solr.war file correctly into Jetty as described here. Basically you have 2 options -

  • Copy the war file into the JETTY_HOME/webapps directory
  • Add the war file path into $JETTY_HOME/contexts/context.xml file

This will deploy Solr into jetty. To run Solr, set the Dsolr.solr.home system property to point to your Solr root directory e.g. java -Dsolr.solr.home= -jar start.jar