[ 
https://issues.apache.org/jira/browse/SOLR-6775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224639#comment-14224639
 ] 

Ryan Hesson commented on SOLR-6775:
-----------------------------------

Not sure if this helps at all but I get the same NullPointerException using 
SOLR version 4.10.2 . Reading the documentation it sounds like SOLR is supposed 
to place snapshot backups in the same data directory as the index. I'm not sure 
how others would not experience this same scenario if they were to set up 
backupAfter in the ReplicationHandler.

If you look at the code repository here for version 4.9:
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.solr/solr-core/4.9.0/org/apache/solr/handler/SnapShooter.java?av=f

it doesn't appear the createSnapshot(...) method sets variable snapShotDir 
equal to anything before it sends it to the SnapPuller.delTree(snapShotDir) 
method. This appears to be the cause of the null pointer exception to me.

Hope this helps,

Ryan

--
Ryan E. Hesson



> Creating backup snapshot null pointer exception
> -----------------------------------------------
>
>                 Key: SOLR-6775
>                 URL: https://issues.apache.org/jira/browse/SOLR-6775
>             Project: Solr
>          Issue Type: Bug
>          Components: replication (java)
>    Affects Versions: 4.10
>         Environment: Linux Server, Java version "1.7.0_21", Solr version 
> 4.10.0
>            Reporter: Ryan Hesson
>              Labels: snapshot, solr
>
> I set up Solr Replication. I have one master on a server, one slave on 
> another server. The replication of data appears functioning correctly. The 
> issue is when the master SOLR tries to create a snapshot backup it gets a 
> null pointer exception. 
> org.apache.solr.handler.SnapShooter createSnapshot method calls 
> org.apache.solr.handler.SnapPuller.delTree(snapShotDir); at line 162 and the 
> exception happens within  org.apache.solr.handler.SnapPuller at line 1026 
> because snapShotDir is null. 
> Here is the actual log output:
> 58319963 [qtp12610551-16] INFO  org.apache.solr.core.SolrCore  - newest 
> commit generation = 349
> 58319983 [Thread-19] INFO  org.apache.solr.handler.SnapShooter  - Creating 
> backup snapshot...
> Exception in thread "Thread-19" java.lang.NullPointerException
>         at org.apache.solr.handler.SnapPuller.delTree(SnapPuller.java:1026)
>         at 
> org.apache.solr.handler.SnapShooter.createSnapshot(SnapShooter.java:162)
>         at org.apache.solr.handler.SnapShooter$1.run(SnapShooter.java:91)
> I may have missed how to set the directory in the documentation but I've 
> looked around without much luck. I thought the process was to use the same 
> directory as the index data for the snapshots. Is this a known issue with 
> this release or am I missing how to set the value? If someone could tell me 
> how to set snapshotdir or confirm that it is an issue and a different way of 
> backing up the index is needed it would be much appreciated. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to