Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16743

Random Solr error in logs when XWiki shuts down

    XMLWordPrintable

Details

    • Unknown

    Description

      This test (https://ci.xwiki.org/job/XWiki/job/xwiki-platform/job/stable-11.8.x/3/testReport/junit/org.xwiki.test.ui/Upgrade84FileStoreTest/Platform_Builds___main___flavor_test_upgrade___Build_for_Flavor_Test___Upgrade___org_xwiki_test_ui_Upgrade84FileStoreTest/) has uncovered a potential issue when shutting down xwiki.

      It seems to happen that from time to time the xwiki webapp is removed from the servlet container (jetty here) before solr has finished shutting down and thus the Jetty webapp CL is no longer available and causes the classloading issue:

       

      2019-09-25 17:30:33,392 [Exec Stream Pumper] - Attempting to stop XWiki cleanly on port 8080... 
      2019-09-25 17:30:33,396 [Exec Stream Pumper] - Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/root/workspace/iki_xwiki-platform_stable-11.8.x@tmp/withMaven22812f0c/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/root/workspace/iki_xwiki-platform_stable-11.8.x@tmp/withMaven22812f0c"  
      2019-09-25 17:30:33,708 [Exec Stream Pumper] - 2019-09-25 17:30:33.708:INFO:oxtjl.NotifyListener:ShutdownMonitor: ---------------------------------- 
      2019-09-25 17:30:33,708 [Exec Stream Pumper] - 2019-09-25 17:30:33.708:INFO:oxtjl.NotifyListener:ShutdownMonitor: Server stopping, please wait while all resources are closed... 
      2019-09-25 17:30:33,713 [Exec Stream Pumper] - 2019-09-25 17:30:33.712:INFO:oejs.AbstractConnector:ShutdownMonitor: Stopped ServerConnector@3bdc8975{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} 
      2019-09-25 17:30:33,713 [Exec Stream Pumper] - 2019-09-25 17:30:33.713:INFO:oejs.session:ShutdownMonitor: Stopped scavenging 
      2019-09-25 17:30:34,420 [Exec Stream Pumper] - 2019-09-25 17:30:34.420:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@2de8284b{/xwiki,null,UNAVAILABLE}{/xwiki} 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 2019-09-25 17:30:34,420 [XWiki Solr index thread] ERROR o.a.s.c.SolrCore               - java.lang.NoClassDefFoundError: org/apache/solr/core/ShutdownAwareDirectory 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.close(CachingDirectoryFactory.java:298) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.closeCacheValue(CachingDirectoryFactory.java:264) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.close(CachingDirectoryFactory.java:194) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.SolrCore.close(SolrCore.java:1667) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:230) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:207) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:504) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:479) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.AbstractSolrInstance.commit(AbstractSolrInstance.java:108) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.commit(DefaultSolrIndexer.java:456) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:435) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at java.lang.Thread.run(Thread.java:748) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - Caused by: java.lang.ClassNotFoundException: org.apache.solr.core.ShutdownAwareDirectory 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:565) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	... 13 more 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] -   
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - Exception in thread "XWiki Solr index thread" java.lang.NoClassDefFoundError: org/apache/solr/core/ShutdownAwareDirectory 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.close(CachingDirectoryFactory.java:298) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.closeCacheValue(CachingDirectoryFactory.java:264) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.CachingDirectoryFactory.close(CachingDirectoryFactory.java:194) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.core.SolrCore.close(SolrCore.java:1667) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:230) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:207) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:504) 
      2019-09-25 17:30:34,421 [Exec Stream Pumper] - 	at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:479) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.AbstractSolrInstance.commit(AbstractSolrInstance.java:108) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.commit(DefaultSolrIndexer.java:456) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:435) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at java.lang.Thread.run(Thread.java:748) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - Caused by: java.lang.ClassNotFoundException: org.apache.solr.core.ShutdownAwareDirectory 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:565) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 	... 13 more 
      2019-09-25 17:30:34,422 [Exec Stream Pumper] - 2019-09-25 17:30:34.422:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@55d56113{/,null,UNAVAILABLE}{/root} 
      2019-09-25 17:30:34,424 [Exec Stream Pumper] - 2019-09-25 17:30:34.424:INFO:oxtjl.NotifyListener:ShutdownMonitor: Done! 
      17:30:34.648 [main] INFO  o.x.test.integration.XWikiExecutor - XWiki server running at [http://localhost:8080/xwiki/bin/get/Main/] has been stopped 

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: