cancel
Showing results for 
Search instead for 
Did you mean: 

SOLR index procedure from machine to machine (4.0d)

jackjm
Champ in-the-making
Champ in-the-making
Hey guys

I am trying to move my alfresco repository from one machine to another (both running community 4.0d on windows). I have successfully transferred the repository and database over; but I am not able to search on the new machine; I am assuming this is because the indexes are missing there. I am using SOLR as my search system (indicated by index.subsystem.name=solr in the alfresco-global.properties file). This was set by default.

Can anyone please give me some information about how I can back my indexes up and move them over so that I can first finish the move and then finish the blog post I have been working on for transferring data in case some one needs the information in the future. Also, I have looked into the backup and restore article in the documentation but it deals with lucene indexes.

Here is the procedure I have followed just in case: say the original machine with the information is A and the machine I am moving to is B

on A:
       – shut down alfrescoTomcat
       – backup the database
       – back up C:\Alfresco\alf_data

on B:
       – shut down alfrescoTomcat
       – log into database and restore from the database dumped above.
       – point dir.root in alfresco-global.properties to C:\Alfresco_backup\alf_data

I have also tried setting index.recovery.mode=FULL in repository.properties on machine B before restarting tomcat but that doesn't seem to help.

If there are suggestions on how to move the indexes over, I will be extremely grateful

thanks a lot     

p.s: the log file did not have any relevant error messages (there were some reg. web quick start), hence I am not posting it; if you would still like to take a look, pls. let me know and I will put it up.
5 REPLIES 5

jackjm
Champ in-the-making
Champ in-the-making
In case my question was not clear, here are some follow questions that if someone could help clarify will be really great:

1) Is the default search engine for 4.0.x SOLR? I could only infer by looking at alfresco-global.properties file

2) Sorry if this questions is contrived; but the documentation seems to indicate that the indexes are backup up by default under alf_data/ ; but i don't have the lucene-indexes folder under alf_data. Is this because SOLR is the the default engine?

3) On a vanilla install where the database and data have been restored successfully, can I trigger a re-index of the database? Can someone please provide instructions if this is possible?

thanks a lot again

michaelk
Champ in-the-making
Champ in-the-making
In case my question was not clear, here are some follow questions that if someone could help clarify will be really great:

1) Is the default search engine for 4.0.x SOLR? I could only infer by looking at alfresco-global.properties file

2) Sorry if this questions is contrived; but the documentation seems to indicate that the indexes are backup up by default under alf_data/ ; but i don't have the lucene-indexes folder under alf_data. Is this because SOLR is the the default engine?

3) On a vanilla install where the database and data have been restored successfully, can I trigger a re-index of the database? Can someone please provide instructions if this is possible?

thanks a lot again

You can do this by simply deleting the indexes …

$ rm -rf alf_data/solr/workspace/SpacesStore/index

andy
Champ on-the-rise
Champ on-the-rise
Hi

1)

SOLR is the default when using the installer.
Lucene is the default otherwise.

You can switch in community using properties and via JMX/Share admin in the enterprise product.

2)

The SOLR back up was not explicitly set prior to 4.0.1 and would go in the default location for the tomcat/solr set up.
It could be set by property (as it now is).
The lucene and SOLR backup locations are not related.

3)

To get SOLR to reindex you have to delete the SOLR index files afetr stopping the app at the moment.

You can find and fix any index issues without rebuilding - see SOLR and Alfrecso section of the wiki.

Andy

jackjm
Champ in-the-making
Champ in-the-making
Michael and Andy

Thank you very much for the feedback.

For now, deleting the directory as indicated by Michael trigerred the re-build of the indexes. I am still pursuing the options to avoid this in the future; I will go through the wiki as suggested and let you know

thanks a lot again guys, really appreciate it

cfox570
Champ in-the-making
Champ in-the-making
I have a problem where new content are indexed but not old content. I followed the suggestion to remove the index folder but only old content is searchable.
Here is some log errors:

2012-03-14 03:45:12,208  ERROR [extensions.webscripts.AbstractRuntime] [http-8443-2] Exception from executeScript - redirecting to status template error: 0214872802 Wrapped Exception (with status template): No live node exists: 
   ID:        2199
   Cache row: NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
   DB row:    NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
org.springframework.extensions.webscripts.WebScriptException: 0214872802 Wrapped Exception (with status template): No live node exists:
   ID:        2199
   Cache row: NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
   DB row:    NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:970)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:393)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:275)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.dao.ConcurrencyFailureException: No live node exists:
   ID:        2199
   Cache row: NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
   DB row:    NodeEntity[ ID=2199, version=83, store=workspace://SpacesStore, uuid=a14f2852-3529-4483-87fd-591868c0936c, typeQNameId=32, localeId=1, aclId=null, deleted=true, transaction=TransactionEntity[ ID=14416, server=null, changeTxnId=78003f8a-5f5f-44c9-a2c8-2bf82727b5bc, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=admin, auditCreated=2012-03-02T10:45:24.722-05:00, auditModifier=admin, auditModified=2012-03-02T10:48:56.433-05:00]]
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getNodeNotNull(AbstractNodeDAOImpl.java:981)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getParentAssocsCached(AbstractNodeDAOImpl.java:3586)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.prependPaths(AbstractNodeDAOImpl.java:3459)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.prependPaths(AbstractNodeDAOImpl.java:3575)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getPaths(AbstractNodeDAOImpl.java:3389)
   at org.alfresco.repo.solr.SOLRTrackingComponentImpl.getNodesMetadata(SOLRTrackingComponentImpl.java:585)
   at sun.reflect.GeneratedMethodAccessor644.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy146.getNodesMetadata(Unknown Source)
   at org.alfresco.repo.web.scripts.solr.NodesMetaD ataGet.executeImpl(NodesMetaDataGet.java:181)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   … 25 more





Mar 13, 2012 8:44:54 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 021320306 GetNodeMetaData return status is 500
   at org.alfresco.solr.client.SOLRAPIClient.getNodesMetaData(SOLRAPIClient.java:721)
   at org.alfresco.solr.tracker.CoreTracker.indexNode(CoreTracker.java:1879)
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1410)
   at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:491)
   at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)