Homeland //

coolzilj · 2012年02月04日 · 最后由 buyhome 回复于 2012年07月25日 · 3636 次阅读

//

我用 thin 和 WEBrick 都跑起来了 pow 木用过

发帖时候那个 Connection refused - connect(2) 是由于 solr 没有启动,用 rake sunspot:solr:start

#2 楼 @huacnlee 我也遇到同类问题,请帮忙看看: 先启动了 solr RAILS_ENV=development bundle exec rake sunspot:solr:start

发帖出现了其它错误: ----------- RSolr::Error::Http in TopicsController#create

RSolr::Error::Http - 500 Internal Server Error Error: Severe errors in solr configuration.

Check your log files for more detailed information on what may be wrong.

If you want solr to continue after configuration errors, change:

false

in null -----------

#3 楼 @buyhome 看看是不是 sunspot 端口被占用

端口没被占,服务能正常起来。

#4 楼 @HungYuHei RSolr::Error::Http - 500 Internal Server Error Error: Severe errors in solr configuration.

Check your log files for more detailed information on what may be wrong.

If you want solr to continue after configuration errors, change:

false

in null

java version "1.5.0" gij (GNU libgcj) version 4.4.6 20110731 (Red Hat 4.4.6-3)

Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@buyhome 错误信息太少,看不出问题,找出 sunpot 和 solr 的 log 文件,错误的原因或许就在里面。

附带 vi sunspot-solr-development.log 中的错误:

2012-7-24 下午4:37:52 org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.10)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.10)
   ...24 more
2012-7-24 下午4:37:52 org.apache.solr.common.SolrException log
SEVERE: java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.10)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar, file:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.10)
   ...24 more

#8 楼 @huacnlee 像是 java 虚拟机的问题,会不会版本低?

换了 jdk6 就正常了!

coolzilj 关闭了讨论。 05月07日 11:22
需要 登录 后方可回复, 如果你还没有账号请 注册新账号