Alfresco search service does not work correctly

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Alfresco search service does not work correctly

Jump to solution

Hi all,
Recently I have upgraded from Alfresco community 5.0.b to 5.2 sucessfully. My current enviroment :
CentOS Linux release 7.3.1611 (Core)
Alfresco 5.2 community install from all-in-one alfresco-community-installer-201707-linux-x64.bin
mysql-community-server-5.7.31-1.el7.x86_64
Alfresco Search Services 1.2.0.1 using Apache Solr 6.6.0 , installation follow https://docs.alfresco.com/search-community/tasks/solr-install-withoutSSL.html 
solr4 has been disabled , removed indexes.

I actually only use Alfresco content management feature at simple level : Scanner capture a specific area on document then create pdf file with unique file name. upload soft files from scanner to ECM , store and search them later when needed.
Alfresco and search service are started successfully athough there are some error in solr.log

2020-10-30 05:14:02.023 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@7b993c65_Worker-29) [   ] o.a.s.t.AbstractTracker Tracking failed for AclTracker - archive
java.net.SocketException: Connection reset

2020-10-30 05:14:02.375 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@7b993c65_Worker-11) [   ] o.a.s.t.AbstractTracker Tracking failed for MetadataTracker - archive
java.io.IOException: org.alfresco.solr.TrackerStateException: 09300000 The trackers work was rolled back by another tracker error
        at org.alfresco.solr.tracker.MetadataTracker.trackTransactions(MetadataTracker.java:758)
        at org.alfresco.solr.tracker.MetadataTracker.trackRepository(MetadataTracker.java:185)
        at org.alfresco.solr.tracker.MetadataTracker.doTrack(MetadataTracker.java:113)
        at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:215)
        at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.alfresco.solr.TrackerStateException: 09300000 The trackers work was rolled back by another tracker error
        at org.alfresco.solr.SolrInformationServer.canUpdate(SolrInformationServer.java:4029)
        at org.alfresco.solr.SolrInformationServer.indexTransaction(SolrInformationServer.java:3607)
        at org.alfresco.solr.tracker.MetadataTracker.indexTransactionsAfterAsynchronous(MetadataTracker.java:791)
        at org.alfresco.solr.tracker.MetadataTracker.trackTransactions(MetadataTracker.java:749)
        ... 6 more

Newest files which are upload after using 5.2 can be searched with filename successfully.
But old files , which older than 1 month cannot be searched (no result)
These are some screenshots about my solr6
3.png
1.png2.png

I found a similar case , so I tried to force solr6 to perform a full index , I update the alfresco-search-services/solrhome/conf/shared.properties (uncomment)

alfresco.suggestable.property.0={http://www.alfresco.org/model/content/1.0}name
alfresco.suggestable.property.1={http://www.alfresco.org/model/content/1.0}title 
alfresco.suggestable.property.2={http://www.alfresco.org/model/content/1.0}description 
alfresco.suggestable.property.3={http://www.alfresco.org/model/content/1.0}content
stop solr6
rm -f /opt/alfresco-search-services/solrhome/archive/index/* 
rm -f /opt/alfresco-search-services/solrhome/alfresco/index/* 
rm -f /opt/alfresco-search-services/solrhome/alfrescoModels/*
rm -rf /opt/alfresco-search-services/contentstore/_DEFAULT_/db/*
start solr6

After restart solr6 , it consumes CPU load for awhile (solr6 perform full index) , when CPU load back to normal (full index done) , I try to search old file again, but still no result , here screenshots
4.png5.png6.png
Please help.

1 Solution

Accepted Solutions
Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

Hi kaynezhang, thanks for your reply.
I will try alfresco search service 1.4 next week, but I read this https://docs.alfresco.com/5.2/concepts/supported-platforms-ACS.html , Alfresco 5.2 only support alfresco search service 1.3 maximum ?
For now I'm back to solr4 , it takes several days to index full (not finished yet), here some screenshot :
10.png

View solution in original post

11 Replies
Alfresco Employee

Re: Alfresco search service does not work correctly

Jump to solution

Any error in Alfresco side?

Did you change the solr port to 8983?

Software Engineer in Alfresco Search Team.
Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

There is some errors (related to "solr" keyword) in catalina.out since I have forced performing full index since yesterday , no error before:

 2020-10-30 12:04:30,078  ERROR [quartz.core.JobRunShell] [DefaultScheduler_Worker-6] Job DEFAULT.org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBe
an#221dcfcf threw an unhandled Exception:
 org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcm
quickstart.jobs.FeedbackProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 0930236479
        at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:321)
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 0930236479
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:591)
        at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:58)
        at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:355)
        at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:159)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:73)

Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at java.net.Socket.<init>(Socket.java:434)
        at java.net.Socket.<init>(Socket.java:286)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.postQuery(SolrQueryHTTPClient.java:1144)
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.postSolrQuery(SolrQueryHTTPClient.java:1109)
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:576)

Solr6 is listening at port 8983 , Alfresco (port 80) connect to Solr6 successfully (using none ssl)

#alfresco-global.properties
alfresco.context=alfresco
alfresco.host=ecm.mydomain.com
alfresco.port=80
alfresco.protocol=http

share.context=share
share.host=ecm.mydomain.com
share.port=80
share.protocol=http
solr.host=localhost
index.subsystem.name=solr6
solr.secureComms=none
solr.port=8983

#solrhome/alfresco/conf/solrcore.properties
#solrhome/archive/conf/solrcore.properties
alfresco.port=80
alfresco.secureComms=none

As I said above, newest files which are upload after using 5.2 can be searched with filename successfully.
But old files , which older than 1 month cannot be searched (no result)
My contentstore or repository has several milion files , is that problems ? How long it takes to index all my files ? Should I restart Alfresco also ?

Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

After restart solr6 + alfresco and force index full again yesterday, the solr results looked much better

# I uncomment these options in /opt/alfresco-search-services/solrhome/conf/shared.properties
# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext

7.png8.png9.png

But the search results still do not satisfy me, should I wait longer so solr6 index all my files ? Or restart alfresco and solr6 again ?
Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

Can anyone help me with this issue ? Alfresco search service does not work correctly cause huge trouble to us since we have million documents in repository and we cannot find correct one when we need, for example you can see these screenshots and solr6 query result:

q1.pngq2.png

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"FVNSGN102000374410",
      "indent":"on",
      "wt":"json",
      "_":"1604305060927"}},
  "_original_parameters_":{
    "q":"FVNSGN102000374410",
    "defType":"afts",
    "df":"suggest",
    "indent":"on",
    "echoParams":"explicit",
    "rows":"10",
    "wt":"json",
    "_":"1604305060927"},
  "_field_mappings_":{},
  "_date_mappings_":{},
  "_range_mappings_":{},
  "_pivot_mappings_":{},
  "_interval_mappings_":{},
  "_stats_field_mappings_":{},
  "_stats_facet_mappings_":{},
  "_facet_function_mappings_":{},
  "lastIndexedTx":8006076,
  "lastIndexedTxTime":1604306057527,
  "txRemaining":0,
  "response":{"numFound":0,"start":0,"docs":[]
  },
  "processedDenies":false}


I can view my document , but the search result return is differrent.
And this is another case, newer file , result return correctly
q4.pngq5.png

{
  "responseHeader":{
    "status":0,
    "QTime":2,
    "params":{
      "q":"FVNSGN102000438410",
      "indent":"on",
      "wt":"json",
      "_":"1604305060927"}},
  "_original_parameters_":{
    "q":"FVNSGN102000438410",
    "defType":"afts",
    "df":"suggest",
    "indent":"on",
    "echoParams":"explicit",
    "rows":"10",
    "wt":"json",
    "_":"1604305060927"},
  "_field_mappings_":{},
  "_date_mappings_":{},
  "_range_mappings_":{},
  "_pivot_mappings_":{},
  "_interval_mappings_":{},
  "_stats_field_mappings_":{},
  "_stats_facet_mappings_":{},
  "_facet_function_mappings_":{},
  "lastIndexedTx":8006042,
  "lastIndexedTxTime":1604305498374,
  "txRemaining":0,
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"_DEFAULT_!80000000000028d3!8000000002740221",
        "_version_":0,
        "DBID":41157153}]
  },
  "processedDenies":false}
Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

Here xml report

http://192.168.7.20:8983/solr/admin/cores?action=REPORT&wt=xml

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">852846</int>
</lst>
<lst name="report">
<lst name="alfresco">
<str name="Alfresco version">5.0.0</str>
<long name="DB acl transaction count">1705</long>
<long name="Count of duplicated acl transactions in the index">0</long>
<long name="Count of acl transactions in the index but not the DB">0</long>
<long name="Count of missing acl transactions from the Index">0</long>
<long name="Index acl transaction count">1707</long>
<long name="Index unique acl transaction count">1707</long>
<long name="Last indexed change set commit time">1604307609445</long>
<str name="Last indexed change set commit date">2020-11-02T09:00:09</str>
<long name="Last changeset id before holes">-1</long>
<long name="DB transaction count">3111395</long>
<long name="Count of duplicated transactions in the index">0</long>
<long name="Count of transactions in the index but not the DB">8</long>
<long name="First transaction in the index but not the DB">115223</long>
<long name="Count of missing transactions from the Index">126</long>
<long name="First transaction missing from the Index">8005539</long>
<long name="Index transaction count">2232442</long>
<long name="Index unique transaction count">2232442</long>
<long name="Index node count">1115992</long>
<long name="Count of duplicate nodes in the index">0</long>
<long name="Index error count">4</long>
<long name="Count of duplicate error docs in the index">0</long>
<long name="Index unindexed count">247</long>
<long name="Count of duplicate unindexed docs in the index">0</long>
<long name="Last indexed transaction commit time">1604308463140</long>
<str name="Last indexed transaction commit date">2020-11-02T09:14:23</str>
<long name="Last TX id before holes">-1</long>
<long name="Node count with FTSStatus Clean">1111057</long>
<long name="Node count with FTSStatus Dirty">0</long>
<long name="Node count with FTSStatus New">0</long>
</lst>
<lst name="archive">
<str name="Alfresco version">5.0.0</str>
<long name="DB acl transaction count">1705</long>
<long name="Count of duplicated acl transactions in the index">0</long>
<long name="Count of acl transactions in the index but not the DB">0</long>
<long name="Count of missing acl transactions from the Index">0</long>
<long name="Index acl transaction count">1707</long>
<long name="Index unique acl transaction count">1707</long>
<long name="Last indexed change set commit time">1604307609445</long>
<str name="Last indexed change set commit date">2020-11-02T09:00:09</str>
<long name="Last changeset id before holes">-1</long>
<long name="DB transaction count">3111447</long>
<long name="Count of duplicated transactions in the index">0</long>
<long name="Count of transactions in the index but not the DB">24</long>
<long name="First transaction in the index but not the DB">8005677</long>
<long name="Count of missing transactions from the Index">118</long>
<long name="First transaction missing from the Index">8005539</long>
<long name="Index transaction count">652</long>
<long name="Index unique transaction count">652</long>
<long name="Index node count">0</long>
<long name="Count of duplicate nodes in the index">0</long>
<long name="Index error count">0</long>
<long name="Count of duplicate error docs in the index">0</long>
<long name="Index unindexed count">0</long>
<long name="Count of duplicate unindexed docs in the index">0</long>
<long name="Last indexed transaction commit time">1604308959049</long>
<str name="Last indexed transaction commit date">2020-11-02T09:22:39</str>
<long name="Last TX id before holes">-1</long>
<long name="Node count with FTSStatus Clean">0</long>
<long name="Node count with FTSStatus Dirty">0</long>
<long name="Node count with FTSStatus New">0</long>
</lst>
</lst>
</response>
Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

Can anyone give me some advice ? I'm atempt to back to use solr4 , or setup a new alfresco search service (version 1.4 or 2.0 ?), to see if it works better.

Advanced

Re: Alfresco search service does not work correctly

Jump to solution

I suggest you upgrade to alfresco search service 1.4 first,we are using 1.4 ,it works fine.

Active Member II

Re: Alfresco search service does not work correctly

Jump to solution

Hi kaynezhang, thanks for your reply.
I will try alfresco search service 1.4 next week, but I read this https://docs.alfresco.com/5.2/concepts/supported-platforms-ACS.html , Alfresco 5.2 only support alfresco search service 1.3 maximum ?
For now I'm back to solr4 , it takes several days to index full (not finished yet), here some screenshot :
10.png

View solution in original post

Advanced

Re: Alfresco search service does not work correctly

Jump to solution

Sorry,I didn't realize that you are using alfreso 5.2, we are using alfresco 6.2 search service 1.4 works fine. 

Since solr14 runs correclty ,you can go back to solr4 now. and later can upgrade alfresco and search service at the same time.