brucebot
V2EX  ›  问与答

关于 solr 服务器上 reindex 跑不起来

  •  
  •   brucebot · May 2, 2014 · 2672 views
    This topic created in 4424 days ago, the information mentioned may be changed or developed.
    Hi,大家好,这两天假期在折腾solr,在mac上本机测试OK后,准备发布到服务器上去,无奈碰到问题了,折腾一个上午还是无果,分别重新安装过tomcat版本的和jetty版本,后来发现可以直接用`gem sunspot `。

    情况是这样的

    1. `bundle exec rake sunspot:solr:start`和`bundle exec rake sunspot:solr:stop`都正常,也可以看到 `x.x.x.x:8983/solr`的界面,admin也有
    2. `bundle exec rake sunspot:solr:reindex`,索引一操作就报错,connection refused.

    我的 sunspot.yml是这样的

    ```
    production:
    solr:
    hostname: localhost
    port: 8983
    log_level: WARNING
    path: /solr/default
    # read_timeout: 2
    # open_timeout: 0.5

    development:
    solr:
    hostname: localhost
    port: 8982
    log_level: INFO
    path: /solr/development

    test:
    solr:
    hostname: localhost
    port: 8981
    log_level: WARNING
    path: /solr/test
    ```

    Gemifle

    ```
    gem 'sunspot_rails'
    gem 'progress_bar'
    gem 'sunspot_solr'

    ```

    另外,发现 sunspot.yml不起作用,reindex的时候仍然在调用localhost:8080而不是localhost:8983
    1 replies    2014-05-02 17:46:37 +08:00
    brucebot
        1
    brucebot  
    OP
       May 2, 2014
    进入console里面看了,Sunspot.config,没有读取sunspot.yml的信息,用的端口还是8080
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:48 · PVG 02:48 · LAX 11:48 · JFK 14:48
    ♥ Do have faith in what you're doing.