Solr 在 Alfresco 6.2 中无法正常工作

Solr is not working properly in Alfresco 6.2

我已经安装了 Alfresco 社区版本 6.2 和 solr,我正在使用它的 Rest API。但是当我调用一些端点时,例如:

"http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/queries/nodes?term=dog&orderBy=name" 

http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/tags?skipCount=0&maxItems=100

在这两种情况下,我都得到以下响应:

{
  "error": {
    "errorKey": "framework.exception.ApiDefault",
    "statusCode": 500,
    "briefSummary": "02231287 Request failed 500 /solr/alfresco/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON",
    "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",
    "descriptionURL": "https://api-explorer.alfresco.com",
    "logId": "d0f12382-f64d-4a41-9307-6796b4a5c324"
  }
}

所以 Solr 似乎是某种问题,但是 Solr 在某些区域工作正常(我的意思是当我启动 Solr 服务器时我清楚地看到我能够在内部搜索共享,例如用户、组、站点,但我无法搜索文件,搜索确切的现有文件名return 没有结果。当我停止 Solr 搜索时是完全关闭)。

这是 alfresco-global.properties :

#
# Set this property unless you have explicitly chosen to expose some repository APIs without authentication
index.subsystem.name=solr6
solr.secureComms=none
solr.port=8983

#
# Custom content and index data location
#
dir.root=/home/mehrdad/alfresco-home/alf_data
dir.keystore=${dir.root}/keystore

#
# Sample database connection properties
#
db.username=postgres
db.password=postgres

#
# Choose DB connection properties for your database, e.g. for PostgreSQL
#
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost:5432/alfresco

#
# URL Generation Parameters (The ${localname} token is replaced by the local server name)
#-------------
alfresco.context=alfresco
alfresco.host=${localname}
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=${localname}
share.port=8080
share.protocol=http


#PDF
alfresco-pdf-renderer.root=/home/mehrdad/alfresco-home/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer

这是 Solr shared.properties(我只取消了一些属性的注释):

# Shared Properties file

#Host details an external client would use to connect to Solr
solr.host=localhost
#If not set then solr.port will be the jetty.port
#solr.port=8983
solr.baseurl=/solr

# Properties treated as identifiers when indexed

alfresco.identifier.property.0={http://www.alfresco.org/model/content/1.0}creator
alfresco.identifier.property.1={http://www.alfresco.org/model/content/1.0}modifier
alfresco.identifier.property.2={http://www.alfresco.org/model/content/1.0}userName
alfresco.identifier.property.3={http://www.alfresco.org/model/content/1.0}authorityName
alfresco.identifier.property.4={http://www.alfresco.org/model/content/1.0}lockOwner

# Suggestable Propeties
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

# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.property.0={http://www.alfresco.org/model/content/1.0}name
alfresco.cross.locale.property.1={http://www.alfresco.org/model/content/1.0}lockOwner

# 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

alfresco.model.tracker.cron=0/10 * * * * ? *

更重要的是,这是 Solr 日志 当这些错误发生时:

2020-03-23 10:45:15.421 INFO  (main) [   ] o.e.j.s.Server jetty-9.3.14.v20161028
2020-03-23 10:45:16.087 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter  ___      _       Welcome to Apache Solr™ version 6.6.5-patched a77dde61f5121c726afb0e50a8e34ebba88534a4 - build - 2018-10-26 16:24:31
2020-03-23 10:45:16.088 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on port 8983
2020-03-23 10:45:16.088 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: /home/mehrdad/alfresco-home/alfresco-search-services/solr
2020-03-23 10:45:16.111 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time: 2020-03-23T10:45:16.090392Z
2020-03-23 10:45:23.950 INFO  (main) [   ] o.e.j.s.Server Started @9865ms
2020-03-23 10:45:34.070 WARN  (Thread-12) [   x:alfresco] o.a.s.c.Config XML parse warning in "solrres:/solrconfig.xml", line 1919, column 88: Include operation failed, reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/home/mehrdad/alfresco-home/alfresco-search-services/solrhome/alfresco'
2020-03-23 10:45:34.921 WARN  (Thread-12) [   x:alfresco] o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class [org.apache.solr.analysis.WordDelimiterFilterFactory]. Please consult documentation how to replace it accordingly.
2020-03-23 10:45:34.926 WARN  (Thread-12) [   x:alfresco] o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly.
2020-03-23 10:45:37.249 WARN  (Thread-12) [   x:alfresco] o.a.s.h.c.AlfrescoSolrClusteringComponent No default engine for document clustering.
2020-03-23 10:45:37.355 WARN  (Thread-12) [   x:alfresco] o.a.s.c.Config XML parse warning in "solrres:/solrconfig.xml", line 1919, column 88: Include operation failed, reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/home/mehrdad/alfresco-home/alfresco-search-services/solrhome/archive'
2020-03-23 10:45:37.859 WARN  (Thread-12) [   x:alfresco] o.a.s.h.c.AlfrescoSolrClusteringComponent No default engine for document clustering.
2020-03-23 10:45:37.901 ERROR (searcherExecutor-21-thread-1-processing-x:alfresco) [   x:alfresco] o.a.s.c.SolrCore null:org.alfresco.error.AlfrescoRuntimeException: 02230000 Failed to initialize keystore: 
   Location: ssl.repo.client.keystore
   Provider: 
   Type:     JCEKS
    at org.alfresco.encryption.AlfrescoKeyStoreImpl.loadKeyStore(AlfrescoKeyStoreImpl.java:576)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl.safeInit(AlfrescoKeyStoreImpl.java:543)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl.<init>(AlfrescoKeyStoreImpl.java:110)
    at org.alfresco.httpclient.HttpClientFactory.init(HttpClientFactory.java:150)
    at org.alfresco.httpclient.HttpClientFactory.<init>(HttpClientFactory.java:145)
    at org.alfresco.solr.client.SOLRAPIClientFactory.getRepoClient(SOLRAPIClientFactory.java:193)
    at org.alfresco.solr.client.SOLRAPIClientFactory.getSOLRAPIClient(SOLRAPIClientFactory.java:174)
    at org.alfresco.solr.lifecycle.SolrCoreLoadRegistration.registerForCore(SolrCoreLoadRegistration.java:73)
    at org.alfresco.solr.lifecycle.SolrCoreLoadListener.newSearcher(SolrCoreLoadListener.java:44)
    at org.apache.solr.core.SolrCore.lambda$getSearcher(SolrCore.java:2249)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute[=15=](ExecutorUtil.java:229)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'ssl-keystore-passwords.properties' in classpath or '/home/mehrdad/alfresco-home/alfresco-search-services/solrhome/archive'
    at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:405)
    at org.alfresco.solr.SolrKeyResourceLoader.loadKeyMetaData(SolrKeyResourceLoader.java:63)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl$KeyInfoManager.loadKeyMetaData(AlfrescoKeyStoreImpl.java:1031)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl$KeyInfoManager.<init>(AlfrescoKeyStoreImpl.java:1013)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl.getKeyInfoManager(AlfrescoKeyStoreImpl.java:401)
    at org.alfresco.encryption.AlfrescoKeyStoreImpl.loadKeyStore(AlfrescoKeyStoreImpl.java:566)
    ... 14 more

.
.
.
.
.
.
.
.
.
.

2020-03-23 12:29:17.468 ERROR (qtp1280851663-124) [   x:alfresco] o.a.s.s.HttpSolrCall null:java.lang.IllegalArgumentException: value already present: _dummy_
    at com.google.common.collect.HashBiMap.put(HashBiMap.java:241)
    at com.google.common.collect.HashBiMap.put(HashBiMap.java:218)
    at org.alfresco.solr.component.RewriteFacetParametersComponent.rewriteFacetFieldList(RewriteFacetParametersComponent.java:509)
    at org.alfresco.solr.component.RewriteFacetParametersComponent.fixFacetParams(RewriteFacetParametersComponent.java:198)
    at org.alfresco.solr.component.RewriteFacetParametersComponent.prepare(RewriteFacetParametersComponent.java:64)
    at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:323)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:534)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589)
    at java.base/java.lang.Thread.run(Thread.java:834)

2020-03-23 12:36:28.604 ERROR (qtp1280851663-17) [   x:alfresco] o.a.s.h.RequestHandlerBase java.lang.NullPointerException
    at org.alfresco.solr.query.Solr4QueryParser.getContentStore(Solr4QueryParser.java:195)
    at org.alfresco.solr.query.Solr4QueryParser.<init>(Solr4QueryParser.java:168)
    at org.alfresco.solr.AlfrescoSolrDataModel.getLuceneQueryParser(AlfrescoSolrDataModel.java:1414)
    at org.alfresco.solr.query.AlfrescoLuceneQParserPlugin$AlfrescoLuceneQParser.parse(AlfrescoLuceneQParserPlugin.java:85)
    at org.apache.solr.search.QParser.getQuery(QParser.java:168)
    at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:161)
    at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:323)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:534)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589)
    at java.base/java.lang.Thread.run(Thread.java:834)

2020-03-23 12:36:28.757 ERROR (qtp1280851663-17) [   x:alfresco] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
    at org.alfresco.solr.query.Solr4QueryParser.getContentStore(Solr4QueryParser.java:195)
    at org.alfresco.solr.query.Solr4QueryParser.<init>(Solr4QueryParser.java:168)
    at org.alfresco.solr.AlfrescoSolrDataModel.getLuceneQueryParser(AlfrescoSolrDataModel.java:1414)
    at org.alfresco.solr.query.AlfrescoLuceneQParserPlugin$AlfrescoLuceneQParser.parse(AlfrescoLuceneQParserPlugin.java:85)
    at org.apache.solr.search.QParser.getQuery(QParser.java:168)
    at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:161)
    at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:323)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:534)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589)
    at java.base/java.lang.Thread.run(Thread.java:834)

注意:第一个错误是关于 SSL,我还没有启用 SSL(根据 Alfresco 文档,我认为这应该不是问题!)

我不知道问题出在哪里,非常感谢您的帮助:)

SearchService\solrhome\alfresco\conf\solrcore.properties
SearchService\solrhome\archive\conf\solrcore.properties

设置参数

alfresco.secureComms=none