Solr
  1. Solr
  2. SOLR-4862

Core admin action "CREATE" fails to persist some settings in solr.xml

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.4, 6.0
    • Component/s: multicore
    • Labels:
      None

      Description

      When I create a core with Core admin handler using these request parameters:

      action=CREATE
      &name=core-tex69bbum21ctk1kq6lmkir-index3
      &schema=/etc/opt/dcx/solr/conf/schema.xml
      &instanceDir=/etc/opt/dcx/solr/
      &config=/etc/opt/dcx/solr/conf/solrconfig.xml
      &dataDir=/var/opt/dcx/solr/core-tex69bbum21ctk1kq6lmkir-index3

      in Solr 4.1, solr.xml would have the following entry:

      <core schema="/etc/opt/dcx/solr/conf/schema.xml" loadOnStartup="true" instanceDir="/etc/opt/dcx/solr/" transient="false" name="core-tex69bbum21ctk1kq6lmkir-index3" config="/etc/opt/dcx/solr/conf/solrconfig.xml" dataDir="/var/opt/dcx/solr/core-tex69bbum21ctk1kq6lmkir-index3/" collection="core-tex69bbum21ctk1kq6lmkir-index3"/>

      while in Solr 4.3 schema, config and dataDir will be missing:

      <core loadOnStartup="true" instanceDir="/etc/opt/dcx/solr/" transient="false" name="core-tex69bbum21ctk1kq6lmkir-index3" collection="core-tex69bbum21ctk1kq6lmkir-index3"/>

      The new core would use the settings specified during CREATE, but after a Solr restart they are lost (fall back to some defaults), as they are not persisted in solr.xml. I should add that solr.xml has persistent="true" in the root element.

      http://lucene.472066.n3.nabble.com/Core-admin-action-quot-CREATE-quot-fails-to-persist-some-settings-in-solr-xml-with-Solr-4-3-td4065786.html

        Issue Links

          Activity

          Hide
          Li Xu added a comment -

          In the example given above, you don't really need to specify config and schema parameters. By default, Solr looks in instanceDir/conf for them. However, if you name your xml files different from the defaults, then this bug will cause you problems.

          Show
          Li Xu added a comment - In the example given above, you don't really need to specify config and schema parameters. By default, Solr looks in instanceDir/conf for them. However, if you name your xml files different from the defaults, then this bug will cause you problems.
          Hide
          Trey Massingill added a comment - - edited

          Seemingly, I'm running into this issue as well. I'm in the process of upgrading from 3.6.1 to 4.3.

          The solr log shows that I passed the dataDir option, but it does not show up in solr.xml. I'm not sure why "collection" is showing up in solr.xml either.

          Log message:

          235705|2013-06-05T20:25:16.774+0000|qtp875010279-17|INFO|o.a.solr.servlet.SolrDispatchFilter|[admin] webapp=null path=/admin/cores params={schema=schema.xml&loadOnStartup=false&instanceDir=.&transient=true&name=queue-2013060518&action=CREATE&config=solrconfig.xml&dataDir=..
          /../index_data/queue-2013060518&wt=json} status=0 QTime=1635
          

          solr.xml

          <?xml version="1.0" encoding="UTF-8" ?>
          <solr persistent="true">
            <cores host="${host:}" adminPath="/admin/cores" shareSchema="true" zkClientTimeout="${zkClientTimeout:15000}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
              <core loadOnStartup="false" instanceDir="./" transient="true" name="queue-2013060518" collection="queue-2013060518"/>
            </cores>
          </solr>
          

          This doesn't seem to cause issues at first. However, after restarting the service, I end up with this warning:

          16764|2013-06-05T20:36:15.289+0000|qtp1711465251-20|WARN|o.a.solr.handler.ReplicationHandler|Unable to get IndexCommit on startup org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/home/tmassi/Development/svn/mta-blockmon-2012/blockmon-solr/blockmon-solr/master/versions/blockmon-solr-2.0.4-SNAPSHOT/config/solr/data/index/write.lock
                  at org.apache.lucene.store.Lock.obtain(Lock.java:84)
                  at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:644)
                  at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:77)
                  at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64)
                  at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:197)
                  at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:110)
                  at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.java:939)
                  at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:616)
                  at org.apache.solr.core.SolrCore.<init>(SolrCore.java:816)
                  at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
                  at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
                  at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
                  at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1227)
                  at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
                  at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
                  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:525)
                  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
                  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
                  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                  at org.eclipse.jetty.server.Server.handle(Server.java:365)
                  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
                  at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
                  at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
                  at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
                  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
                  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
                  at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
                  at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                  at java.lang.Thread.run(Thread.java:679)
          

          ... quickly followed by this error:

          17212|2013-06-05T20:36:15.737+0000|Finalizer|ERROR|o.a.solr.update.SolrIndexWriter|SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!! 
          17213|2013-06-05T20:36:15.738+0000|Finalizer|ERROR|o.a.solr.update.SolrIndexWriter|Error closing IndexWriter, trying rollback java.lang.NullPointerException: null
                  at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:934)
                  at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:895)
                  at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:857)
                  at org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:146)
                  at org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:202)
                  at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                  at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
                  at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
                  at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)
          

          If there is any other information I can gather, please let me know.

          Show
          Trey Massingill added a comment - - edited Seemingly, I'm running into this issue as well. I'm in the process of upgrading from 3.6.1 to 4.3. The solr log shows that I passed the dataDir option, but it does not show up in solr.xml. I'm not sure why "collection" is showing up in solr.xml either. Log message: 235705|2013-06-05T20:25:16.774+0000|qtp875010279-17|INFO|o.a.solr.servlet.SolrDispatchFilter|[admin] webapp=null path=/admin/cores params={schema=schema.xml&loadOnStartup=false&instanceDir=.&transient=true&name=queue-2013060518&action=CREATE&config=solrconfig.xml&dataDir=.. /../index_data/queue-2013060518&wt=json} status=0 QTime=1635 solr.xml <?xml version="1.0" encoding="UTF-8" ?> <solr persistent="true"> <cores host="${host:}" adminPath="/admin/cores" shareSchema="true" zkClientTimeout="${zkClientTimeout:15000}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}"> <core loadOnStartup="false" instanceDir="./" transient="true" name="queue-2013060518" collection="queue-2013060518"/> </cores> </solr> This doesn't seem to cause issues at first. However, after restarting the service, I end up with this warning: 16764|2013-06-05T20:36:15.289+0000|qtp1711465251-20|WARN|o.a.solr.handler.ReplicationHandler|Unable to get IndexCommit on startup org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/home/tmassi/Development/svn/mta-blockmon-2012/blockmon-solr/blockmon-solr/master/versions/blockmon-solr-2.0.4-SNAPSHOT/config/solr/data/index/write.lock at org.apache.lucene.store.Lock.obtain(Lock.java:84) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:644) at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:77) at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64) at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:197) at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:110) at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.java:939) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:616) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:816) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984) at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1227) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:525) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:679) ... quickly followed by this error: 17212|2013-06-05T20:36:15.737+0000|Finalizer|ERROR|o.a.solr.update.SolrIndexWriter|SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!! 17213|2013-06-05T20:36:15.738+0000|Finalizer|ERROR|o.a.solr.update.SolrIndexWriter|Error closing IndexWriter, trying rollback java.lang.NullPointerException: null at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:934) at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:895) at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:857) at org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:146) at org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:202) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101) at java.lang.ref.Finalizer.access$100(Finalizer.java:32) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190) If there is any other information I can gather, please let me know.
          Hide
          Erick Erickson added a comment -

          Fixed as part of SOLR-4910

          Show
          Erick Erickson added a comment - Fixed as part of SOLR-4910
          Hide
          Steve Rowe added a comment -

          Bulk close resolved 4.4 issues

          Show
          Steve Rowe added a comment - Bulk close resolved 4.4 issues

            People

            • Assignee:
              Erick Erickson
              Reporter:
              André Widhani
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development