Solr
  1. Solr
  2. SOLR-1769

Solr 1.4 Replication - Repeater throwing NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4.1
    • Component/s: None
    • Labels:
      None

      Description

      Hi

      I am trying to test Solr 1.4 Java replication. It works fine with this configuration on slave and data is sync from master with out any issue

      <requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="slave">
      <str name="masterUrl">http://IP:PORT/SolrSmartPriceSS/replication</str>
      <str name="compression">internal</str>
      <str name="httpConnTimeout">5000</str>
      <str name="httpReadTimeout">10000</str>
      </lst>
      </requestHandler>

      We need to setup repeater on this slave. We have this configuration on slave. With this configuration, it's throwing a null pointer exception. Please see error log

      <requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="master">
      <str name="replicateAfter">commit</str>
      <str name="confFiles">schema.xml</str>
      </lst>
      <lst name="slave">
      <str name="masterUrl">http://IP:PORT/SolrSmartPriceSS/replication</str>
      <str name="compression">internal</str>
      <str name="httpConnTimeout">5000</str>
      <str name="httpReadTimeout">10000</str>
      </lst>
      </requestHandler>

      Error log

      INFO: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false)
      Feb 9, 2010 10:27:55 PM org.apache.solr.handler.ReplicationHandler doFetch
      SEVERE: SnapPull failed
      org.apache.solr.common.SolrException: Index fetch failed :
      at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329)
      at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264)
      at org.apache.solr.handler.ReplicationHandler$1.run(ReplicationHandler.java:146)
      Caused by: java.lang.NullPointerException
      at org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922)
      at org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78)
      at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411)
      at org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:467)
      at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:319)

      Please let us know how can we resolve this issue

      Regards
      Deepak

      1. SOLR-1769
        2 kB
        Noble Paul
      2. SOLR-1769-nullcheck.patch
        0.8 kB
        Jörgen Rydenius
      3. solrconfig.xml
        44 kB
        Ravi Gidwani
      4. solrconfig.xml
        30 kB
        Deepak
      5. solrconfigSolr1.4.xml
        47 kB
        Deepak

        Activity

        Hide
        Noble Paul added a comment -

        can you share the deletionPolicy in the repeater?

        Show
        Noble Paul added a comment - can you share the deletionPolicy in the repeater?
        Hide
        Deepak added a comment -

        Hi Paul

        We have not defined any deletionPolicy in the solrconfig.xml file. We have this solrconfig.xml file from Solr 1.3. We have just changed LRUCache to FastLRUCache and defined replication request handler.

        Please see attached file for your reference

        Regards
        Deepak

        Show
        Deepak added a comment - Hi Paul We have not defined any deletionPolicy in the solrconfig.xml file. We have this solrconfig.xml file from Solr 1.3. We have just changed LRUCache to FastLRUCache and defined replication request handler. Please see attached file for your reference Regards Deepak
        Hide
        Deepak added a comment -

        Attached the correct file now

        Show
        Deepak added a comment - Attached the correct file now
        Hide
        Noble Paul added a comment -

        Let me assume that you are using the 1.4 release and not a daily nightly build

        I don't see anything obviously wrong. meanwhile, why don't you just pick up the solrconfig.xml from 1.4 and make the necessary changes and test it out?

        Show
        Noble Paul added a comment - Let me assume that you are using the 1.4 release and not a daily nightly build I don't see anything obviously wrong. meanwhile, why don't you just pick up the solrconfig.xml from 1.4 and make the necessary changes and test it out?
        Hide
        Deepak added a comment -

        Hi Paul

        Yes we are using Solr 1.4 release. Also, I tried with Solr 1.4 config file, but I am getting the same error. Please see attached config file

        Regards
        Deepak

        Show
        Deepak added a comment - Hi Paul Yes we are using Solr 1.4 release. Also, I tried with Solr 1.4 config file, but I am getting the same error. Please see attached config file Regards Deepak
        Hide
        Deepak added a comment -

        If data/index directory is empty (i.e. only contains segments file), replication works without any issue.

        It does not work if data/index directory has old data. I hope that helps to resolve the issue. Also, I have noticed old data does not get deleted after replication is finished

        Show
        Deepak added a comment - If data/index directory is empty (i.e. only contains segments file), replication works without any issue. It does not work if data/index directory has old data. I hope that helps to resolve the issue. Also, I have noticed old data does not get deleted after replication is finished
        Hide
        Ravi Gidwani added a comment -

        Hi Noble:
        I am seeing a similar/same exception with following default settings:

        <requestHandler name="/replication" class="solr.ReplicationHandler" >
        <lst name="master">
        <str name="replicateAfter">commit</str>
        <str name="replicateAfter">startup</str>
        <str name="confFiles">schema.xml,stopwords.txt</str>
        </lst>
        <lst name="slave">
        <str name="masterUrl">http://<master_ip>/solr/replication</str>
        <str name="pollInterval">00:00:60</str>
        </lst>
        </requestHandler>

        My setup:
        Solr 1.4 ,
        3 nodes
        1 master, 2 slaves

        I see these exceptions on the slaves eerytime a commit happens on the master. After this it looks like the index is out of sync on the salves. After sometime the salves again sync with master and this the sync is successful.

        Is there any known issues that I should look into ? Is there any work around for this bug ? Are there any settings that I can try out ?

        Show
        Ravi Gidwani added a comment - Hi Noble: I am seeing a similar/same exception with following default settings: <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="master"> <str name="replicateAfter">commit</str> <str name="replicateAfter">startup</str> <str name="confFiles">schema.xml,stopwords.txt</str> </lst> <lst name="slave"> <str name="masterUrl">http://<master_ip>/solr/replication</str> <str name="pollInterval">00:00:60</str> </lst> </requestHandler> My setup: Solr 1.4 , 3 nodes 1 master, 2 slaves I see these exceptions on the slaves eerytime a commit happens on the master. After this it looks like the index is out of sync on the salves. After sometime the salves again sync with master and this the sync is successful. Is there any known issues that I should look into ? Is there any work around for this bug ? Are there any settings that I can try out ?
        Hide
        Noble Paul added a comment -

        Are you using a solrconfig from an older version of solr?
        We really do not know the problem and we are using repeaters in our org w/o any Exception so we are unable to reproduce this

        Show
        Noble Paul added a comment - Are you using a solrconfig from an older version of solr? We really do not know the problem and we are using repeaters in our org w/o any Exception so we are unable to reproduce this
        Hide
        Ravi Gidwani added a comment -

        Hi Noble:
        Thanks for your comments. Here is more information:

        1) I checked the solrconfig.xml . I am using the solr 1.4 with application specific changes. I am attaching the solrconfig.xml for your reference.
        2) All our solr servers (1 master, 2 slaves) are deployed on EC2 instances. They are all 64 bit instances.
        3) Running with JDK 1.6 on Jetty 6.1.5

        Here is the entire exception:

        SEVERE: SnapPull failed
        org.apache.solr.common.SolrException: Index fetch failed :
        at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329)
        at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264)
        at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
        Caused by: java.lang.RuntimeException: java.io.IOException: read past EOF
        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
        at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:418)
        at org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:467)
        at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:319)
        ... 11 more
        Caused by: java.io.IOException: read past EOF
        at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:151)
        at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
        at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:70)
        at org.apache.lucene.index.SegmentTermEnum.<init>(SegmentTermEnum.java:50)
        at org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:71)
        at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:119)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:638)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
        at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:228)
        at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:32)
        at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:437)
        at org.apache.lucene.index.DirectoryReader.access$000(DirectoryReader.java:43)
        at org.apache.lucene.index.DirectoryReader$2.doBody(DirectoryReader.java:429)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
        at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:425)
        at org.apache.lucene.index.DirectoryReader.reopen(DirectoryReader.java:352)
        at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:413)
        at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:424)
        at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:35)
        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1049)
        ... 14 more
        Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller downloadIndexFiles
        INFO: Skipping download for /mnt/solr/data/index/_2o.fdx
        Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller downloadIndexFiles
        INFO: Skipping download for /mnt/solr/data/index/_2n.tvf
        Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller fetchLatestIndex
        INFO: Total time taken for download : 0 secs
        Mar 4, 2010 11:51:00 AM org.apache.solr.handler.ReplicationHandler doFetch
        SEVERE: SnapPull failed
        org.apache.solr.common.SolrException: Index fetch failed :
        at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329)
        at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264)
        at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
        Caused by: java.io.FileNotFoundException: File does not exist /mnt/solr/./data/index.20100304115100/_2o.tis
        at org.apache.solr.common.util.FileUtils.sync(FileUtils.java:55)
        at org.apache.solr.handler.SnapPuller$FileFetcher$1.run(SnapPuller.java:911)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        ... 3 more

        Show
        Ravi Gidwani added a comment - Hi Noble: Thanks for your comments. Here is more information: 1) I checked the solrconfig.xml . I am using the solr 1.4 with application specific changes. I am attaching the solrconfig.xml for your reference. 2) All our solr servers (1 master, 2 slaves) are deployed on EC2 instances. They are all 64 bit instances. 3) Running with JDK 1.6 on Jetty 6.1.5 Here is the entire exception: SEVERE: SnapPull failed org.apache.solr.common.SolrException: Index fetch failed : at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329) at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264) at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: java.io.IOException: read past EOF at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068) at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:418) at org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:467) at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:319) ... 11 more Caused by: java.io.IOException: read past EOF at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:151) at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38) at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:70) at org.apache.lucene.index.SegmentTermEnum.<init>(SegmentTermEnum.java:50) at org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:71) at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:119) at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:638) at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599) at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:228) at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:32) at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:437) at org.apache.lucene.index.DirectoryReader.access$000(DirectoryReader.java:43) at org.apache.lucene.index.DirectoryReader$2.doBody(DirectoryReader.java:429) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704) at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:425) at org.apache.lucene.index.DirectoryReader.reopen(DirectoryReader.java:352) at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:413) at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:424) at org.apache.solr.search.SolrIndexReader.reopen(SolrIndexReader.java:35) at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1049) ... 14 more Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller downloadIndexFiles INFO: Skipping download for /mnt/solr/data/index/_2o.fdx Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller downloadIndexFiles INFO: Skipping download for /mnt/solr/data/index/_2n.tvf Mar 4, 2010 11:51:00 AM org.apache.solr.handler.SnapPuller fetchLatestIndex INFO: Total time taken for download : 0 secs Mar 4, 2010 11:51:00 AM org.apache.solr.handler.ReplicationHandler doFetch SEVERE: SnapPull failed org.apache.solr.common.SolrException: Index fetch failed : at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329) at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264) at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.FileNotFoundException: File does not exist /mnt/solr/./data/index.20100304115100/_2o.tis at org.apache.solr.common.util.FileUtils.sync(FileUtils.java:55) at org.apache.solr.handler.SnapPuller$FileFetcher$1.run(SnapPuller.java:911) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) ... 3 more
        Hide
        Ravi Gidwani added a comment -

        solr 1.4 solrconfig.xml file used.

        Show
        Ravi Gidwani added a comment - solr 1.4 solrconfig.xml file used.
        Hide
        Noble Paul added a comment -

        This may not be a fix for this issue. but this was a bug. Do an fsync only if the file download is successful

        Show
        Noble Paul added a comment - This may not be a fix for this issue. but this was a bug. Do an fsync only if the file download is successful
        Hide
        Ravi Gidwani added a comment -

        Thanks Noble.. I will try this patch on Solr 1.4 and post my findings..

        Show
        Ravi Gidwani added a comment - Thanks Noble.. I will try this patch on Solr 1.4 and post my findings..
        Hide
        Noble Paul added a comment -

        The patch does'nt fix the issue. But it may give us a different stacktrace

        Show
        Noble Paul added a comment - The patch does'nt fix the issue. But it may give us a different stacktrace
        Hide
        Jörgen Rydenius added a comment -

        I also have problems with the solr master after restarting with a non-empty data dir. NullPointerException on line ReplicationHandler$4.postCommit(ReplicationHandler.java:922), just like the trace above, but no SnapPuller in my stack:

        java.lang.NullPointerException
            at org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922)
            at org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78)
            at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411)
            at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85)
            at org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:107)
            at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:48)
            at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
            at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
            at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
            at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
            at java.lang.Thread.run(Thread.java:619)
        

        Restarting after clearing the solr data dir works fine. I uncommented the following lines in solrconfig.xml on my master:

        <!--Master config-->
        <requestHandler name="/replication" class="solr.ReplicationHandler" >
            <lst name="master">
                <str name="replicateAfter">commit</str>
                 <str name="confFiles">schema.xml,stopwords.txt</str>
            </lst>
        </requestHandler>
        
        Show
        Jörgen Rydenius added a comment - I also have problems with the solr master after restarting with a non-empty data dir. NullPointerException on line ReplicationHandler$4.postCommit(ReplicationHandler.java:922), just like the trace above, but no SnapPuller in my stack: java.lang.NullPointerException at org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922) at org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78) at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411) at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85) at org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:107) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:48) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:619) Restarting after clearing the solr data dir works fine. I uncommented the following lines in solrconfig.xml on my master: <!--Master config--> <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="master"> <str name="replicateAfter">commit</str> <str name="confFiles">schema.xml,stopwords.txt</str> </lst> </requestHandler>
        Hide
        Jörgen Rydenius added a comment -

        Line 922 of ReplicationHandler.java looks like this:

                  core.getDeletionPolicy().saveCommitPoint(indexCommitPoint.getVersion());

        core.getDeletionPolicy() returns an instance of org.apache.solr.core.IndexDeletionPolicyWrapper, but indexCommitPoint is null according to the debugger, so indexCommitPoint.getVersion() triggers the NullPointerException. The IndexDeletionPolicyWrapper obviously returned null on the getLatestCommit() call in line 921. I'm unsure if it is just a missing null check of indexCommitPoint on line 922, or if it is an illegal state for an IndexDeletionPolicyWrapper to have latestCommit == null. Anyway, that is what really happens.

        Show
        Jörgen Rydenius added a comment - Line 922 of ReplicationHandler.java looks like this: core.getDeletionPolicy().saveCommitPoint(indexCommitPoint.getVersion()); core.getDeletionPolicy() returns an instance of org.apache.solr.core.IndexDeletionPolicyWrapper, but indexCommitPoint is null according to the debugger, so indexCommitPoint.getVersion() triggers the NullPointerException. The IndexDeletionPolicyWrapper obviously returned null on the getLatestCommit() call in line 921. I'm unsure if it is just a missing null check of indexCommitPoint on line 922, or if it is an illegal state for an IndexDeletionPolicyWrapper to have latestCommit == null. Anyway, that is what really happens.
        Hide
        Jörgen Rydenius added a comment -

        This simple null-check solved things for me.

        Show
        Jörgen Rydenius added a comment - This simple null-check solved things for me.
        Hide
        Noble Paul added a comment -

        This can be checked in . I wonder what is the underlying reason

        Show
        Noble Paul added a comment - This can be checked in . I wonder what is the underlying reason
        Hide
        Jörgen Rydenius added a comment -

        I do not have commit privileges. Would it be possible for you to commit the null-check?

        Show
        Jörgen Rydenius added a comment - I do not have commit privileges. Would it be possible for you to commit the null-check?
        Hide
        Noble Paul added a comment -

        committed r929454

        Show
        Noble Paul added a comment - committed r929454
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Mark Miller added a comment -

        This has been marked 1.4.1 and is still open - anyone?

        Show
        Mark Miller added a comment - This has been marked 1.4.1 and is still open - anyone?
        Hide
        Noble Paul added a comment -

        I shall fix this

        Show
        Noble Paul added a comment - I shall fix this
        Hide
        Jörgen Rydenius added a comment -

        The null check that was checked in by Noble Paul resolved the symptoms for me. Don't know if it fixes every issue listed above though.

        Show
        Jörgen Rydenius added a comment - The null check that was checked in by Noble Paul resolved the symptoms for me. Don't know if it fixes every issue listed above though.
        Hide
        Mark Miller added a comment -

        Whats the eta on this Noble? I'd like to get an RC up (hopefully by tomorrow) so perhaps we can release with Lucene 2.9.3 and 3.0.1 (or at least very shortly thereafter)

        Show
        Mark Miller added a comment - Whats the eta on this Noble? I'd like to get an RC up (hopefully by tomorrow) so perhaps we can release with Lucene 2.9.3 and 3.0.1 (or at least very shortly thereafter)
        Hide
        Noble Paul added a comment -

        committed r954709

        Show
        Noble Paul added a comment - committed r954709

          People

          • Assignee:
            Noble Paul
            Reporter:
            Deepak
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development