我对这一切都比较新,所以如果我在这里排列的内容不是很有用,请随时要求澄清或提供更多信息!
我试图使用solr的太阳黑子,到目前为止已经按照this guide的步骤1和2进行了操作。
其他规格:
Ubuntu 12.04.3 LTS gem' rails',' 4.0.2' gem' sunspot_rails','〜> 2.1.1'
tomcat 6以及链接指南中的其他信息
数据库运行正常,tomcat和solr也是如此(它们可分别通过:8080&:8080 / solr url访问),所以我怀疑我在某个地方捏造了一些配置。
目前我收到此错误:
RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
Error: <html><head><title>Apache Tomcat/6.0.35 - Error report</title><style><!--H1 {font-family:Tahoma,A
rial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;colo
r:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;
background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.n
ame {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /solr/production
/select</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/solr/pr
oduction/select</u></p><p><b>description</b> <u>The requested resource (/solr/production/select) is not
available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.35</h3></body></html>
Request Data: "fq=type%3AItem&start=0&rows=4&q=%2A%3A%2A"
Backtrace: /home/deploy/socialnom_production/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client
.rb:283:in `adapt_response'
/home/deploy/socialnom_production/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
/home/deploy/socialnom_production/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive'
etc
sunspot.yml:
production:
solr:
hostname: localhost
port: 8983
log_level: WARNING
path: /solr/production
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
path: /solr/development
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test
来自我的应用程序的conf和架构在/ usr / share / solr / conf和/ usr / share / conf中,我还没触及那些
之前,在我摆弄所有东西之前,我得到了一个ERRNO:PERMISSION DENIED或某种类似的信息,如果这些信息有用的话。
答案 0 :(得分:0)
sunspot.yml中的端口和Tomcat使用的端口必须相同。你说你可以通过8080端口访问solr,所以你的sunspot.yml:
production:
solr:
hostname: localhost
port: 8080 # This is the port of Tomcat
log_level: WARNING
path: /solr/production
Tomcat在tomcat6用户权限下运行,因此data
中的solr/production
目录必须是该用户可写的。
答案 1 :(得分:0)
我有类似的问题。我希望我的解决方案可以帮助任何人。
如果您的sunspot.yml包含类似
的块production:
solr:
hostname: localhost
port: 8080 # This is the port of Tomcat
log_level: WARNING
path: /solr/production
然后检查sold.xml是否包含名为production
<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:}">
<core name="production" instanceDir="." dataDir="default/data"/>
...
</cores>