简体   繁体   English

如何将码头服务器与Solr实例连接

[英]how to connect jetty server with solr instance

I'm running Jetty as a service (followed these instructions) on an Ubuntu 14 server. 我在Ubuntu 14服务器上将Jetty作为服务运行(遵循这些说明)。 It's been configured to run on port 9000, and it seems to this just fine. 已将其配置为在端口9000上运行,这似乎还不错。

On the same server, I have a solr instance folder (it's located outside of jetty, as part of a website). 在同一台服务器上,我有一个solr实例文件夹(它位于码头附近,作为网站的一部分)。

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. 我想要的是能够浏览到主机名:9000 / solr和主机名:9000 / solr / admin,然后查看/管理我的Solr实例文件夹中的数据,但是我从Jetty服务获得的都是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. 如果我通过运行'java -Djetty.port = 9000 -jar start.jar'手动启动实例,则实例本身可以完美运行-但是,这不是我想要的。

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

First make sure you have deployed the solr.war file correctly into Jetty as described here . 首先,请确保已按照此处所述将solr.war文件正确部署到Jetty中。 Basically you have 2 options - 基本上,您有2个选择-

  • Copy the war file into the JETTY_HOME/webapps directory 将war文件复制到JETTY_HOME / webapps目录中
  • Add the war file path into $JETTY_HOME/contexts/context.xml file 将war文件路径添加到$ JETTY_HOME / contexts / context.xml文件中

This will deploy Solr into jetty. 这会将Solr部署到码头。 To run Solr, set the Dsolr.solr.home system property to point to your Solr root directory eg java -Dsolr.solr.home= -jar start.jar 要运行Solr,请将Dsolr.solr.home系统属性设置为指向您的Solr根目录,例如java -Dsolr.solr.home = -jar start.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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