Ruby on Rails - Solr/Sunspot:连接被拒绝 - 连接(2)

3 solr ruby-on-rails passenger sunspot tomcat6

我正在尝试部署使用太阳黑子的Rails应用程序.我已经关注 https://github.com/outoftime/sunspot/wiki/Configure-Solr-on-Ubuntu,-the-quickest-way,但在运行应用程序时,我得到以下内容:

连接被拒绝 - 连接(2)

这表明它无法正常访问服务器,我一直在谷歌搜索和尝试几个小时,但无济于事.

有任何想法吗?

小智 5

您可以尝试重建索引

$rake sunspot:solr:reindex RAILS_ENV=production
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,你可以......

$rm solr/pids/production/sunspot-solr-production.pid
Run Code Online (Sandbox Code Playgroud)

......开始solr

$rake sunspot:solr:start RAILS_ENV=production
Run Code Online (Sandbox Code Playgroud)

...并重新重新索引

$rake sunspot:solr:reindex RAILS_ENV=production
Run Code Online (Sandbox Code Playgroud)