1

我正在尝试在我尝试测试的 Windows 机器上设置我的 Rails 应用程序。但是,当我尝试使用 Mongo 和 Solr 进行搜索时,出现此错误:

Errno::ECONNREFUSED (No connection could be made because the target machine actively refused it. - connect(2)):
  app/controllers/centers_controller.rb:384:in `center_search'
  lib/ct_gems/dm-core-1.2.0/lib/dm-core.rb:263:in `block in repository'
  lib/ct_gems/dm-core-1.2.0/lib/dm-core/repository.rb:114:in `scope'
  lib/ct_gems/dm-core-1.2.0/lib/dm-core.rb:263:in `repository'


  Rendered ruby-postgres/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.0ms)
  Rendered ruby-postgres/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (15.6ms)
  Rendered ruby-postgres/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (234.0ms)

这些是我必须运行应用程序的命令:

mongod
rails s
redis-server.exe
rake sunspot:solr:run

当我调用方法 solr_search 时发生错误。

这是通过启动 solr 在命令提示符下的输出:

Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode, sharing)
2012-11-06 11:43:21.446:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2012-11-06 11:43:21.552:INFO::jetty-6.1-SNAPSHOT
2012-11-06 11:43:21.763:INFO::Extract file:/C:/Users/Ger/Documents/web_dev/connectedtrips/ruby-postgres/ruby/1.9.1/bundler/g
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/'
Nov 06, 2012 11:43:22 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: C:\Users\Ger\Documents\web_dev\connectedtrips\ruby-postgres\ruby\1.9.1\bundler\gems\sunspot-f8d9
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
Nov 06, 2012 11:43:22 AM org.apache.solr.core.CoreContainer <init>
INFO: New CoreContainer: solrHome=solr/ instance=26947014
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/'
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr\.\'
Nov 06, 2012 11:43:22 AM org.apache.solr.core.SolrConfig initLibs
INFO: Adding specified lib dirs to ClassLoader
Nov 06, 2012 11:43:22 AM org.apache.solr.core.Config getLuceneVersion
WARNING: the luceneMatchVersion is not specified, defaulting to LUCENE_24 emulation. You should at some point declare and re
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrConfig <init>
INFO: Using Lucene MatchVersion: LUCENE_24
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrConfig <init>
WARNING: Deprecated syntax found. <highlighting/> should move to <searchComponent/>
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrConfig <init>
INFO: Loaded SolrConfig: solrconfig.xml
Nov 06, 2012 11:43:23 AM org.apache.solr.schema.IndexSchema readSchema
INFO: Reading Solr Schema
Nov 06, 2012 11:43:23 AM org.apache.solr.schema.IndexSchema readSchema
INFO: Schema name=sunspot
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created string: org.apache.solr.schema.StrField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tdouble: org.apache.solr.schema.TrieDoubleField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created rand: org.apache.solr.schema.RandomSortField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created : org.apache.solr.analysis.StandardTokenizerFactory
Nov 06, 2012 11:43:23 AM org.apache.solr.analysis.BaseTokenStreamFactory assureMatchVersion
WARNING: StandardTokenizerFactory is using deprecated LUCENE_24 emulation. You should at some point declare and reindex to a
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created : org.apache.solr.analysis.StandardFilterFactory
Nov 06, 2012 11:43:23 AM org.apache.solr.analysis.BaseTokenStreamFactory assureMatchVersion
WARNING: StandardFilterFactory is using deprecated LUCENE_24 emulation. You should at some point declare and reindex to at l
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created : org.apache.solr.analysis.LowerCaseFilterFactory
Nov 06, 2012 11:43:23 AM org.apache.solr.analysis.BaseTokenStreamFactory assureMatchVersion
WARNING: LowerCaseFilterFactory is using deprecated LUCENE_24 emulation. You should at some point declare and reindex to at
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created text: org.apache.solr.schema.TextField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created boolean: org.apache.solr.schema.BoolField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created date: org.apache.solr.schema.DateField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sdouble: org.apache.solr.schema.SortableDoubleField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sfloat: org.apache.solr.schema.SortableFloatField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sint: org.apache.solr.schema.SortableIntField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created slong: org.apache.solr.schema.SortableLongField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tint: org.apache.solr.schema.TrieIntField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tfloat: org.apache.solr.schema.TrieFloatField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tdate: org.apache.solr.schema.TrieDateField
Nov 06, 2012 11:43:23 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created location: org.apache.solr.schema.LatLonType
Nov 06, 2012 11:43:23 AM org.apache.solr.schema.IndexSchema readSchema
INFO: default search field is text
Nov 06, 2012 11:43:23 AM org.apache.solr.schema.IndexSchema readSchema
INFO: query parser default operator is AND
Nov 06, 2012 11:43:23 AM org.apache.solr.schema.IndexSchema readSchema
INFO: unique key field: id
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore <init>
INFO: [] Opening new SolrCore at solr\.\, dataDir=./solr/data\
Nov 06, 2012 11:43:23 AM org.apache.solr.core.JmxMonitoredMap <init>
INFO: No JMX servers found, not exposing Solr information with JMX.
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore initListeners
INFO: [] Added SolrEventListener for newSearcher: org.apache.solr.core.QuerySenderListener{queries=[]}
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore initListeners
INFO: [] Added SolrEventListener for firstSearcher: org.apache.solr.core.QuerySenderListener{queries=[{q=solr rocks,start=0,
Nov 06, 2012 11:43:23 AM org.apache.solr.request.XSLTResponseWriter <init>
WARNING: org.apache.solr.request.XSLTResponseWriter is deprecated. Please use the corresponding class in org.apache.solr.res
Nov 06, 2012 11:43:23 AM org.apache.solr.response.XSLTResponseWriter init
INFO: xsltCacheLifetimeSeconds=5
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created standard: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created dismax: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created partitioned: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /spell: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created tvrh: org.apache.solr.handler.component.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: org.apache.solr.handler.extraction.ExtractingRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/extract: org.apache.solr.handler.extraction.ExtractingRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /terms: org.apache.solr.handler.component.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /elevate: solr.SearchHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update: solr.XmlUpdateRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/javabin: solr.BinaryUpdateRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /analysis/document: solr.DocumentAnalysisRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /analysis/field: solr.FieldAnalysisRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: solr.CSVRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/csv: solr.CSVRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /admin/: org.apache.solr.handler.admin.AdminHandlers
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /admin/ping: PingRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /debug/dump: solr.DumpRequestHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /mlt: solr.MoreLikeThisHandler
Nov 06, 2012 11:43:23 AM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@11a1bb4 main
Nov 06, 2012 11:43:23 AM org.apache.solr.update.CommitTracker <init>
INFO: commitTracker AutoCommit: disabled
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SpellCheckComponent inform
INFO: Initializing spell checkers
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SpellCheckComponent inform
WARNING: No queryConverter defined, using default converter
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.QueryElevationComponent inform
INFO: Loading QueryElevation from: C:\Users\Ger\Documents\web_dev\connectedtrips\ruby-postgres\ruby\1.9.1\bundler\gems\sunsp
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.QueryComponent@51d871
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.FacetComponent@158e4ee
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.MoreLikeThisComponent@11dd242
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.HighlightComponent@d6f8f6
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.StatsComponent@17300c2
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  debug component:org.apache.solr.handler.component.DebugComponent@136d8e4
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.QueryComponent@51d871
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.FacetComponent@158e4ee
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.MoreLikeThisComponent@11dd242
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.HighlightComponent@d6f8f6
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.StatsComponent@17300c2
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  debug component:org.apache.solr.handler.component.DebugComponent@136d8e4
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.QueryComponent@51d871
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.FacetComponent@158e4ee
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.MoreLikeThisComponent@11dd242
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.HighlightComponent@d6f8f6
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.StatsComponent@17300c2
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  debug component:org.apache.solr.handler.component.DebugComponent@136d8e4
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.QueryComponent@51d871
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.FacetComponent@158e4ee
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.MoreLikeThisComponent@11dd242
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.HighlightComponent@d6f8f6
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.StatsComponent@17300c2
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.SpellCheckComponent@1d974d9
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  debug component:org.apache.solr.handler.component.DebugComponent@136d8e4
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.QueryComponent@51d871
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.FacetComponent@158e4ee
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.MoreLikeThisComponent@11dd242
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.HighlightComponent@d6f8f6
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.StatsComponent@17300c2
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.TermVectorComponent@1865381
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  debug component:org.apache.solr.handler.component.DebugComponent@136d8e4
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding  component:org.apache.solr.handler.component.TermsComponent@1d4714d
Nov 06, 2012 11:43:23 AM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to Searcher@11a1bb4 main
Nov 06, 2012 11:43:23 AM org.apache.solr.core.CoreContainer register
INFO: registering core:
Nov 06, 2012 11:43:23 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=C:\Users\Ger\Documents\web_dev\connectedtrips\ruby-postgres\ruby\1.9.1\bundler\gems\sunspot-f8d901958835\suns
Nov 06, 2012 11:43:23 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=null params={start=0&event=firstSearcher&q=solr+rocks&rows=10} hits=0 status=0 QTime=46
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=null params={event=firstSearcher&q=static+firstSearcher+warming+query+from+solrconfig.xml} hits=0
Nov 06, 2012 11:43:23 AM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener done.
Nov 06, 2012 11:43:23 AM org.apache.solr.handler.component.SpellCheckComponent$SpellCheckerListener newSearcher
INFO: Loading spell index for spellchecker: default
Nov 06, 2012 11:43:23 AM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@11a1bb4 main
Nov 06, 2012 11:43:23 AM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Nov 06, 2012 11:43:23 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
Nov 06, 2012 11:43:23 AM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
2012-11-06 11:43:23.930:INFO::Started SocketConnector@0.0.0.0:8983

我不太确定这里出了什么问题。我确定我已经正确设置了我的应用程序。谁能向我解释这里出了什么问题并可能帮助我?谢谢

编辑:这可能不是 Windows 的特定错误。现在发生在我的 Mac 上,当我的一个邮件程序尝试发送邮件时发生错误。我正在使用 resque 和 redis 来运行后台作业。

4

1 回答 1

1

你能单独点击 solr url 看看它是否有效。它不起作用然后检查 solr 日志以查看错误的实际原因。

于 2012-11-07T00:23:38.720 回答