cancel
Showing results for 
Search instead for 
Did you mean: 

SOLR Tracking Failed

mangar
Star Contributor
Star Contributor
I have upgraded my Alfresco to 4.0.d comm from 3.3  Everything went fairly well, except for the SOLR stuff.  I had to copy the original /solr directory from my initial install to my backed up alf_data, but that's it.  Everything seems to work fine except for my log files filling up with this:
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: First transaction was not found with the correct timestamp.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: First transaction was not found with the correct timestamp.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: SOLR has successfully connected to your repository  however the SOLR indexes and repository database do not match.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: SOLR has successfully connected to your repository  however the SOLR indexes and repository database do not match.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: If this is a new or rebuilt database you SOLR indexes also need to be re-built to match the database.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: If this is a new or rebuilt database you SOLR indexes also need to be re-built to match the database.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: You can also check your SOLR connection details in solrcore.properties.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: You can also check your SOLR connection details in solrcore.properties.
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 05260001 Initial transaction not found with correct timestamp
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1243)
   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)
Jun 26, 2012 11:48:46 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 05260000 Initial transaction not found with correct timestamp
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1243)
   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)

I have tried and tried to rebuild my indexes, but to no avail.  I deleted my alf_data/solr/archive and alf_data/solr/workspace like the manual said. But to no avail.  In fact, the directories are not being re-created at all.

I tried to remove SOLR completely by removeing the webapp and the solr.xml in Catalina/localhost, but when I do that, I get this error when I try and log in:

java.lang.reflect.InvocationTargetException
caused by:
org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 05260005 Request failed 404 /solr/alfresco/alfresco?q=%2B%40cq%5C%3Aprogram%3A%22EMBA%22+%2B%40cq%5C%3AfileCreateDate%3A%5B2012-06-26T00%3A00%3A55.166-05%3A00+TO+2012-06-26T12%3A09%3A55.166-05%3A00%5D&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON


Now I get the 404, as I have just removed SOLR, but why is Lucene talking to SOLR? I thought they were independent of each other?

So I need to:

a:  Fix the orrgingal error, or
b:  Remove SOLR and still work.

Any Ideas?
3 REPLIES 3

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

Do not copy the SOLR index from anywhere (as it does not apply to the same DB)
Start with a clean SOLR set up - do not take the SOLR index data from a clean install for example)
SOLR checks the first transaction information in the index against the DB to guard against mis-configuration.
It will not add information from repository A to an index based on repository B …. 

Also see ALF-14237

There is an issue with ACL change set timestamps when upgrading to 4.0 which you will have to fix by hand (until there is another community release)

update alf_acl_change_set c
set c.commit_time_ms = ((select min(t.commit_time_ms) from alf_transaction t) + c.id)
where c.commit_time_ms < (select min(t.commit_time_ms) from alf_transaction t)

There are some issue that can stop SOLR tracking (eg errors in JSON for odd user names)
If you see a 500 error and SOLR tracking stops use the FIX action as described on the SOLR wiki page.

(These issues are fixed in the enterprise product.)

Andy

dbachem
Champ in-the-making
Champ in-the-making
Dear Andy, I have the same problem (Initial transaction not found with correct timestamp) but didn't understand if your ACL patch gives a solution. According to your comment…

> Do not copy the SOLR index from anywhere (as it does not apply to the same DB)
> Start with a clean SOLR set up - do not take the SOLR index data from a clean install for example)
> SOLR checks the first transaction information in the index against the DB to guard against mis-configuration.
> It will not add information from repository A to an index based on repository B ….


Do you have any further instructions how to "start with a clean SOLR set up"?

My usage scenario is following: in our production environment we migrated from 3.4 to 4.0.c some month ago, but for some reason our service partner disabled SOLR completely. Now i want to install a "staging" copy of this production system, dumped postgres and copied alf_data. The target system is a clean alfresco_community_4.0.d with default configuration, meaning SOLR enabled. So my intent is to get this staging system running with production data but WITH solr. What is the right way to do this?

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

Do not use the index from the install - make sure there is no SOLR index.
The SOLR logging should report creating the index.

Yes you will require the patch/fix.

Andy