一尘不染

为什么不能使用CentOS,plesk 9.2.1和tomcat 5.5 solr 1.3.0安装?

tomcat

好的,我只是通过其托管服务提供商为我的客户设置了专用服务器。他们在那里安装了plesk(版本9.2.1),此专用服务器的警告之一是,如果我在控制面板之外执行任何任务(即使用SSH)以执行任何任务,则它们不保证支持该软件组件。很好,因为无论如何我还是愿意使用控制面板来完成它,因为我要做的就是上传一个war文件来安装servlet。

但是,这是问题所在,在安装了最新版本的solr(1.3.0)之后,我在plesk中得到了一个警告图标,它给了我一个模糊的错误,例如“应用程序的实际状态与从数据库中检索到的状态不对应。

这是日志条目:

Aug 17, 2009 11:16:15 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Aug 17, 2009 11:16:15 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: Using JNDI solr.home: /usr/share/solr
Aug 17, 2009 11:16:15 PM
org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: /usr/share/solr/solr.xml
Aug 17, 2009 11:16:15 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/usr/share/solr/'
Aug 17, 2009 11:16:15 PM org.apache.solr.core.SolrResourceLoader
createClassLoader
INFO: Reusing parent classloader
Aug 17, 2009 11:16:15 PM org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
java.lang.ExceptionInInitializerError
       at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
       at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
       at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:448)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
failed to create an XPathFactory for the default object model:
http://java.sun.com/jaxp/xpath/dom with the
XPathFactoryConfigurationException:
javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
implementation found for the object model:
http://java.sun.com/jaxp/xpath/dom
       at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
       at org.apache.solr.core.Config.<clinit>(Config.java:41)
       ... 20 more
Aug 17, 2009 11:16:15 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter SolrRequestFilter
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.solr.core.SolrConfig
       at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:76)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
       at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:448)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Aug 17, 2009 11:16:15 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Aug 17, 2009 11:16:15 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/solr] startup failed due to previous errors

solr / home目录存在,那么为什么solr对此有所抱怨?


阅读 211

收藏
2020-06-16

共1个答案

一尘不染

好的,这是问题所在!事实证明,有些tomcat发行版没有对xalan的引用,这是XPathFactory异常的来源。此错误可能会引起误解,因为它将错误记录为solr
/ home属性未设置的问题。事实是它已被设置。10次​​中有9次由于未设置solr / home目录而导致启动solr出现问题。

这是我自己修复的方式:我进入/usr/share/tomcat5/shared/lib目录并创建到目录中xalan-j2.jar文件的符号链接/usr/share/java。重新启动Tomcat并立即启动Solr!

其他一些技巧:在solr.war要上传的文件中编辑web.xml文件,将其取消封装,进行更改,然后重新将其封装。将目录设置为/usr/share/solr。这样,如果日志未显示其使用该目录作为solr
/ home,则存在问题。另外,确保solr / home看起来像这样:

/usr/share/solr/
/usr/share/solr/bin
/usr/share/solr/bin/rsyncd-stop
/usr/share/solr/bin/abo
/usr/share/solr/bin/scripts-util
/usr/share/solr/bin/snappuller-disable
/usr/share/solr/bin/backupcleaner
/usr/share/solr/bin/snapcleaner
/usr/share/solr/bin/rsyncd-disable
/usr/share/solr/bin/snapinstaller
/usr/share/solr/bin/commit
/usr/share/solr/bin/snappuller-enable
/usr/share/solr/bin/snappuller
/usr/share/solr/bin/backup
/usr/share/solr/bin/rsyncd-start
/usr/share/solr/bin/abc
/usr/share/solr/bin/rsyncd-enable
/usr/share/solr/bin/optimize
/usr/share/solr/bin/snapshooter
/usr/share/solr/bin/readercycle
/usr/share/solr/conf
/usr/share/solr/conf/schema.xml
/usr/share/solr/conf/solrconfig.xml
/usr/share/solr/conf/synonyms.txt
/usr/share/solr/conf/xslt
/usr/share/solr/conf/xslt/example_atom.xsl
/usr/share/solr/conf/xslt/luke.xsl
/usr/share/solr/conf/xslt/example_rss.xsl
/usr/share/solr/conf/xslt/example.xsl
/usr/share/solr/conf/elevate.xml
/usr/share/solr/conf/scripts.conf
/usr/share/solr/conf/protwords.txt
/usr/share/solr/conf/spellings.txt
/usr/share/solr/conf/admin-extra.html
/usr/share/solr/conf/stopwords.txt
/usr/share/solr/README.txt

具有user:group权限的用户必须是tomcat:tomcat。如果solr正常启动,将创建数据目录。

希望这可以为某人节省大量时间。

2020-06-16