aws上tomcat7上的solr服务器没有启动

时间:2013-05-15 08:06:50

标签: tomcat solr amazon-web-services bitnami

我的solr服务器没有在使用bitnami tomcat堆栈创建的aws上的tomcat7上启动 以下是错误:

SEVERE: Error deploying configuration descriptor /opt/bitnami/apache-tomcat/conf/Catalina/localhost/solr.xml  
java.lang.NullPointerException   

这是完整的堆栈跟踪:

INFO: Starting service Catalina  
May 15, 2013 7:01:51 AM org.apache.catalina.core.StandardEngine startInternal  
INFO: Starting Servlet Engine: Apache Tomcat/7.0.39  
May 15, 2013 7:01:51 AM org.apache.catalina.startup.HostConfig deployDescriptor  
INFO: Deploying configuration descriptor /opt/bitnami/apache-tomcat/conf/Catalina/localhost/solr.xml  
May 15, 2013 7:01:52 AM org.apache.catalina.startup.HostConfig deployDescriptor  
SEVERE: Error deploying configuration descriptor /opt/bitnami/apache-tomcat/conf/Catalina/localhost/solr.xml  
java.lang.NullPointerException  
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:625)  
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)  
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)  
at java.util.concurrent.FutureTask.run(FutureTask.java:166)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  

May 15, 2013 7:01:52 AM org.apache.catalina.startup.HostConfig deployDescriptors  
SEVERE: Error waiting for multi-thread deployment of context descriptors to complete  
java.util.concurrent.ExecutionException: java.lang.NullPointerException  
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)  
at java.util.concurrent.FutureTask.get(FutureTask.java:111)  
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:579)  
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)  
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1402)  
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)  
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)  
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)  
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)  
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)  

/opt/bitnami/apache-tomcat/conf/Catalina/localhost/solr.xml看起来像这样。

<?xml version="1.0" encoding="utf-8"?> <context crossContext="true" debug="0" docBase="/usr/share/solr/solr.war"> <environment name="solr/home" override="true" value="/usr/share/solr" type="java.lang.String"> </environment></context>

/ usr / share / solr /的内容看起来也很好

bitnami@ip-10-144-66-148:/usr/share/solr$ ls -l  
total 11384  

drwxr-xr-x 2 tomcat tomcat 4096 Jul 17  2012 bin  
drwxr-xr-x 5 tomcat tomcat 4096 May 13 13:11 conf  
drwxr-xr-x 9 tomcat tomcat 4096 Jul 17  2012 contrib  
drwxr-xr-x 2 tomcat tomcat 4096 May 13 13:20 data  
drwxr-xr-x 2 tomcat tomcat 4096 May 13 13:21 lib  
-rw-r--r-- 1 tomcat tomcat 2259 Jul 17  2012 README.txt  
-rw-r--r-- 1 tomcat tomcat 11628199 May 14 12:58 solr.war    
-rw-r--r-- 1 tomcat tomcat 1676 Jul 17  2012 solr.xml  

不确定出了什么问题,但这让我吃了一惊: - (

1 个答案:

答案 0 :(得分:2)

问题是因为文件/usr/share/tomcat7/conf/Catalina/localhost/solr.xml xml节点是小写字母但它应该以大写字母开头 这是

<context crossContext="true" debug="0" docBase="/usr/share/solr/solr.war"> <environment name="solr/home" override="true" value="/usr/share/solr" type="java.lang.String"> </environment></context>

应该是

<Context crossContext="true" debug="0" docBase="/usr/share/solr/solr.war">
<Environment name="solr/home" override="true" value="/usr/share/solr" type="java.lang.String">
</Environment></Context>