cancel
Showing results for 
Search instead for 
Did you mean: 

solr tracking failed

mrksjs
Champ on-the-rise
Champ on-the-rise
hello,

i am running alfresco 4.0.d and my log is filling up with the following exceptions

Apr 5, 2012 5:25:15 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: First transaction was not found with the correct timestamp.
Apr 5, 2012 5:25:15 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.
Apr 5, 2012 5:25:15 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.
Apr 5, 2012 5:25:15 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: You can also check your SOLR connection details in solrcore.properties.
Apr 5, 2012 5:25:15 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 030532287 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)
Apr 5, 2012 5:25:30 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: First transaction was not found with the correct timestamp.
Apr 5, 2012 5:25:30 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.
Apr 5, 2012 5:25:30 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.
Apr 5, 2012 5:25:30 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: You can also check your SOLR connection details in solrcore.properties.
Apr 5, 2012 5:25:30 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 030532288 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)
Apr 5, 2012 5:25:45 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: First transaction was not found with the correct timestamp.
Apr 5, 2012 5:25:45 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.
Apr 5, 2012 5:25:45 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.
Apr 5, 2012 5:25:45 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: You can also check your SOLR connection details in solrcore.properties.
Apr 5, 2012 5:25:45 AM org.alfresco.solr.tracker.CoreTracker trackRepository
SEVERE: Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 030532289 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)

however, i am using lucene as indexing service, what am i missing?

### Solr indexing ###
index.subsystem.name=lucene

in alf-data there is a solr directory and there are alfresco.log files with following content

10:15:13,836 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 02300792 Wrapped Exception (with status template):
### Error querying database.  Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
### The error may exist in alfresco/ibatis/#resource.dialect#/activities-common-SqlMap.xml
### The error may involve alfresco.activities.select_activity_feed_for_feeduser
### The error occurred while executing a query
### SQL: select id as id, activity_type as activityType, activity_format as activitySummaryFormat, activity_summary as activitySummary, feed_user_id as feedUserId, post_user_id as postUserId, site_network as siteNetwork, post_date as po$
### Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Borrow prepareStatement from pool failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
org.springframework.extensions.webscripts.WebScriptException: 02300792 Wrapped Exception (with status template):
### Error querying database.  Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
### The error may exist in alfresco/ibatis/#resource.dialect#/activities-common-SqlMap.xml
### The error may involve alfresco.activities.select_activity_feed_for_feeduser
### The error occurred while executing a query
### SQL: select id as id, activity_type as activityType, activity_format as activitySummaryFormat, activity_summary as activitySummary, feed_user_id as feedUserId, post_user_id as postUserId, site_network as siteNetwork, post_date as po$
### Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Borrow prepareStatement from pool failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
        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:316)
        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:470)
        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:662)
Caused by: org.springframework.jdbc.UncategorizedSQLException:
### Error querying database.  Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
### The error may exist in alfresco/ibatis/#resource.dialect#/activities-common-SqlMap.xml
### The error may involve alfresco.activities.select_activity_feed_for_feeduser
### The error occurred while executing a query
### SQL: select id as id, activity_type as activityType, activity_format as activitySummaryFormat, activity_summary as activitySummary, feed_user_id as feedUserId, post_user_id as postUserId, site_network as siteNetwork, post_date as po$
### Cause: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Borrow prepareStatement from pool failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
        at $Proxy6.selectList(Unknown Source)
….

10:32:01,797 WARN  [org.springframework.extensions.webscripts.servlet.FormData] Failed to get content: /opt/alfresco-4.0.d/tomcat/temp/upload_3fe89aaa_1361712170d__7d4b_00000523.tmp (No such file or directory)
10:32:15,761 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.feedGeneratorJobDetail threw an unhandled Exception:
org.alfresco.repo.lock.LockAcquisitionException: 023045239 Failed to release lock '{http://www.alfresco.org/model/system/1.0}activityfeedgenerator' using token '457d0edb-8328-447e-b82d-12e136bf650b'.  The lock has expired and been taken by another process.
        at org.alfresco.repo.domain.locks.AbstractLockDAOImpl.updateLocks(AbstractLockDAOImpl.java:218)
        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.activities.feed.AbstractFeedGenerator$LockTracker.releaseLock(AbstractFeedGenerator.java:241)
        at org.alfresco.repo.activities.feed.AbstractFeedGenerator.releaseLock(AbstractFeedGenerator.java:220)
        at org.alfresco.repo.activities.feed.AbstractFeedGenerator.execute(AbstractFeedGenerator.java:198)
        at org.alfresco.repo.activities.feed.FeedGeneratorJob.execute(FeedGeneratorJob.java:50)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
10:32:15,762 ERROR [org.quartz.core.ErrorLogger] Job (DEFAULT.feedGeneratorJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.repo.lock.LockAcquisitionException: 023045239 Failed to release lock '{http://www.alfresco.org/model/system/1.0}activityfeedgenerator' $
        at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.alfresco.repo.lock.LockAcquisitionException: 023045239 Failed to release lock '{http://www.alfresco.org/model/system/1.0}activityfeedgenerator' using token '457d0edb-8328-447e-b82d-12e136bf650b'.  The lock has expired and$
        at org.alfresco.repo.domain.locks.AbstractLockDAOImpl.updateLocks(AbstractLockDAOImpl.java:218)
        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.activities.feed.AbstractFeedGenerator$LockTracker.releaseLock(AbstractFeedGenerator.java:241)
        at org.alfresco.repo.activities.feed.AbstractFeedGenerator.releaseLock(AbstractFeedGenerator.java:220)
        at org.alfresco.repo.activities.feed.AbstractFeedGenerator.execute(AbstractFeedGenerator.java:198)
        at org.alfresco.repo.activities.feed.FeedGeneratorJob.execute(FeedGeneratorJob.java:50)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        … 1 more


7 REPLIES 7

mitpatoliya
Star Collaborator
Star Collaborator
It seems like your database and your indexes are not in sync.
Try once with full index true in alfresco-globle.properties file.
Restart server.
If does not work better to go for fresh installation.

mrksjs
Champ on-the-rise
Champ on-the-rise
thank you for your reply!

that was our first guess too, but we rebuilt the index several times without any luck.

i read about problems with the records management module model, may this cause solr problems? in my understanding solr shouldn't be running, since it is not used. or am i missing something?

mitpatoliya
Star Collaborator
Star Collaborator
Have you changed this sub system settings after doing some transactions?
then I guess it could created problem.
Some got indexed by solr some by lucene.
Just a guess. Smiley Indifferent

loftux
Star Contributor
Star Contributor
If you are running with lucene only you can remove the solr app. Solr runs as a separate application, and can run simultaneous to lucene. But the repository will not use it for search, it just index in the background.
So when you do
index.recovery.mode=FULL
it will only do a full re-index for lucene.
For a full solr re-index, you have to stop solr, and delete the solr index directory. That may be what have happened here, you haven't actually re-indexed solr.

Back to how to remove solr
Stop tomcat
delete tomcat/conf/Catalina/localhost/solr.xml
delete directory tomcat/webapps/solr
restart

More on Solr http://wiki.alfresco.com/wiki/Alfresco_And_SOLR

carlos_cruz
Champ in-the-making
Champ in-the-making
Hi Loftux, I am a new alfresco user, and I have the same problem (SEVERE: SOLR has successfully connected to your repository  however the SOLR indexes and repository database do not match.). I can see that the solution is:

Back to how to remove solr
Stop tomcat
delete tomcat/conf/Catalina/localhost/solr.xml
delete directory tomcat/webapps/solr
restart

so, what implications that do this procedure?, indispensalbe information be deleted for operating alfresco?, or affect some other documents and I have already loaded in alfresco?

sorry for my english.

Thanks !!

mrksjs
Champ on-the-rise
Champ on-the-rise
logfile looks clear now!

tack så mycket!! ; )

dbachem
Champ in-the-making
Champ in-the-making
Just in case, that you still get solr exceptions after following given instructions to disable SOLR. There might be exclusive SOLR configuration in alfresco-global.properties and/or repository.properties. Check for index.subsystem.name  😎 .