2016-02-11 176 views
0

在運行apt-get更新後& &在Ubuntu 12.04盒子上進行apt-get升級並重新啓動後,之前在tomcat6下運行沒有問題的Solr服務無法啓動,以下錯誤:Solr在Ubuntu 12.04上的java更新後無法啓動12.04

530 [main] ERROR org.apache.solr.servlet.SolrDispatchFilter – Could not start Solr. Check solr/home property and the logs 
564 [main] ERROR org.apache.solr.core.SolrCore – null:java.lang.NoClassDefFoundError: sun/security/util/CryptoPrimitive 
    at sun.security.ssl.ProtocolVersion.<clinit>(ProtocolVersion.java:113) 
    at sun.security.ssl.SSLContextImpl$ConservativeSSLContext.<clinit>(SSLContextImpl.java:464) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:190) 
    at java.security.Provider$Service.getImplClass(Provider.java:1277) 
    at java.security.Provider$Service.newInstance(Provider.java:1237) 
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:236) 
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:164) 
    at javax.net.ssl.SSLContext.getInstance(SSLContext.java:142) 
    at javax.net.ssl.SSLContext.getDefault(SSLContext.java:85) 
    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:119) 
    at org.apache.http.conn.ssl.SSLSocketFactory.getSystemSocketFactory(SSLSocketFactory.java:193) 
    at org.apache.http.impl.conn.SchemeRegistryFactory.createSystemDefault(SchemeRegistryFactory.java:82) 
    at org.apache.http.impl.client.SystemDefaultHttpClient.createClientConnectionManager(SystemDefaultHttpClient.java:118) 
    at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:466) 
    at org.apache.solr.client.solrj.impl.HttpClientUtil.setMaxConnections(HttpClientUtil.java:197) 
    at org.apache.solr.client.solrj.impl.HttpClientConfigurer.configure(HttpClientConfigurer.java:33) 
    at org.apache.solr.client.solrj.impl.HttpClientUtil.configureClient(HttpClientUtil.java:133) 
    at org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(HttpClientUtil.java:109) 
    at org.apache.solr.handler.component.HttpShardHandlerFactory.init(HttpShardHandlerFactory.java:152) 
    at org.apache.solr.handler.component.ShardHandlerFactory.newInstance(ShardHandlerFactory.java:50) 
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:194) 
    at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:183) 
    at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:133) 
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) 
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) 
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) 
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) 
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) 
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) 
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) 
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) 
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) 
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:525) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 
    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:622) 
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 

我試圖切換到Tomcat7/OpenJDK7,但收到完全相同的錯誤。 Tomcat本身運行正常,但solr不啓動,並在嘗試訪問/ solr路徑時返回503。

所以這是Solr的一個實例,它在apt-get升級之前完美工作,現在不是......我不知道除了試用Oracle JDK之外,還有什麼要做,在Ubuntu上我從來沒有這樣做過,我不確定爲什麼在這種情況下應該這樣做。

Java的版本報告:

java version "1.6.0_27" 
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.4) 
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) 

感謝你的任何想法!

+0

這就是你在日誌上得到的所有東西? 如果你還有它,你能打印apt-get更新/升級的結果嗎? –

+0

我添加了更多的錯誤結果,並添加了我當前的Java信息...不幸的是,我沒有apt-get的結果,對不起! – stockli

+1

在我更新/升級類路徑中的某些內容後,我的看法被破壞了。 通常java.lang.NoClassDefFoundError意味着JVM無法在運行時找到或加載在編譯期間可用的特定類 您可以驗證是否存在所有安裝目錄(Solr,data,java) –

回答

1

想通了......原來,我只是需要完全刪除並重新安裝tomcat6中,和所有相關的軟件包,通過:

apt-get remove tomcat6 
apt-get autoremove 

我也已經安裝OpenJDK7原因在於試圖解決這個問題,所以我也跑:

apt-get remove openjdk-6-jre-headless openjdk-6-jre-lib openjdk-7-jre-headless 

之後,我只是做了:

apt-get install tomcat6 

它禾像預期的那樣前進。所有先前的solr設置都已經存在,所以一切立即恢復,不需要索引。正如馬文上面所說,CryptoPrimitive應該只有1.7,所以我不知道爲什麼升級後有這個問題,因爲我們一直在運行1.6。

無論如何,希望這有助於未來的其他人,感謝評論,所有!