AnsweredAssumed Answered

Cluster with single solr instance: solr backup howto?

Question asked by dirko on Jan 14, 2013
Latest reply on Jul 31, 2013 by colindstephenson
Hello,

we have a 2 node alfresco cluster with solr on a 3rd node. at the moment both alfresco nodes have the same solr-backup.properties config:

solr.backup.alfresco.cronExpression=0 0 2 * * ?
solr.backup.archive.cronExpression=0 0 4 * * ?
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco
solr.backup.archive.remoteBackupLocation=${dir.root}/solrBackup/archive
solr.backup.alfresco.numberToKeep=3
solr.backup.archive.numberToKeep=3

so both alfresco's try to make a solr backup at the same moment, and if this happens exactly in the same second this results in following exception on 1 of the nodes:

02:00:06,294 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.search.alfrescoCoreBackupJobDetail threw an unhandled Exception:
java.lang.NullPointerException
at org.alfresco.repo.domain.locks.AbstractLockDAOImpl.updateLocks(AbstractLockDAOImpl.java:190)
at org.alfresco.repo.domain.locks.AbstractLockDAOImpl.releaseLock(AbstractLockDAOImpl.java:172)
at org.alfresco.repo.lock.JobLockServiceImpl$3.execute(JobLockServiceImpl.java:428)
at org.alfresco.repo.lock.JobLockServiceImpl$3.execute(JobLockServiceImpl.java:425)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
at org.alfresco.repo.lock.JobLockServiceImpl.releaseLock(JobLockServiceImpl.java:432)
at org.alfresco.repo.search.impl.solr.SolrBackupClient.execute(SolrBackupClient.java:122)
at org.alfresco.repo.search.impl.solr.SolrBackupJob.execute(SolrBackupJob.java:58)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

what would be the best practice for this setup:
- make 1 alfresco node responsible for the solr backup?
- have 2 backups at a different time?
- ?

cheers,
dirk

Outcomes