06-09-2020 01:41 AM
Dear support,
My name is Ángel and I am writing to you from Fundación CARTIF. As I indicated in the thread issue, we have problems with the SOLR 6 engine in our Alfresco Community 6.x
Specifically, we saw the following error in the alfresco.log and tried to rebuild the entire solr6 indexing but it didn't work.
2020-06-08 12:10:23,615 ERROR [org.alfresco.repo.site.SiteServiceImpl] [http-nio-8080-exec-23] LuceneQueryParserException with findSites() org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 05080032 Request failed 500 /solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=5&df=TEXT&start=0&locale=es_ES&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
The symptoms are as follows:
- When accessing a site's repository a popup appears with the previous error.
- We get different results with different users when we do a document search in the whole repository. Add that after trying a rebuild of the index now no user finds anything.
We have followed these links:
https://docs.alfresco.com/5.1/tasks/solr-reindex.html
https://www.zylk.net/en/web-2-0/blog/-/blogs/performing-a-full-reindex-with-solr-for-alfresco-ecm
Any idea what might be happening and how to fix it?
Thank you very much for your attention.
Best regards,
Ángel.
06-09-2020 02:55 AM
No hint on the log error you are adding, as the main cause of the problem will be in the SOLR log, not in the Alfresco log.
Related with the re-index, I guess you have not configured your repo for cross locale searches.
You can find a Docker Template available in https://github.com/aborroy/search-services-cross-locale
Also check point 3 in official documentation: https://docs.alfresco.com/search-community/tasks/solr-install-withoutSSL.html
Once you have applied the configuration, you'll need to re-index SOLR again.
https://docs.alfresco.com/search-community/tasks/solr-reindex.html
06-09-2020 04:17 AM
Hi @angelborroy
Thank you for your answer. Following the thread https://docs.alfresco.com/search-community/tasks/solr-install-withoutSSL.html I have seen that in point 6, when I try to access http://localhost:8983/solr, I get a 404 error.
The rest of the file configuration is correct.
Therefore, I couldn't continue with the SOLR re-index.
Thank you very much.
Greetings,
Angel.
06-09-2020 05:24 AM
Have you started SOLR correctly?
Is there any error in the logs?
06-09-2020 06:30 AM
Hi @angelborroy
To start it I simply used the command "./solr start -force" and this is what returns the status of the service:
angel:/opt/alfresco/alfresco-search-services/solr/bin# ./solr status Found 1 Solr nodes: Solr process 766 running on port 8983 ERROR: Failed to get system information from http://localhost:8983/solr due to: org.apache.http.client.ClientProtocolException: Expected JSON response from server but received: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 404 </title> </head> <body> <h2>HTTP ERROR: 404</h2> <p>Problem accessing /solr/admin/info/system. Reason: <pre> Not Found</pre></p> <hr /> </body> </html> Typically, this indicates a problem with the Solr server; check the Solr server logs for more information.
And here we've got the solr log file:
log4j:ERROR Could not read configuration file from URL [file:../logs/log4j.properties]. java.io.FileNotFoundException: ../logs/log4j.properties (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526) at org.apache.log4j.LogManager.<clinit>(LogManager.java:127) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277) at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:38) at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:32) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at org.eclipse.jetty.util.log.Log.initialized(Log.java:177) at org.eclipse.jetty.util.log.Log.getLogger(Log.java:310) at org.eclipse.jetty.util.log.Log.getLogger(Log.java:300) at org.eclipse.jetty.xml.XmlConfiguration.<clinit>(XmlConfiguration.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.jetty.start.Main.invokeMain(Main.java:214) at org.eclipse.jetty.start.Main.start(Main.java:457) at org.eclipse.jetty.start.Main.main(Main.java:75) log4j:ERROR Ignoring configuration file [file:../logs/log4j.properties]. log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
The file log4j.properties has not been touched and looks like this:
# Alfresco Solr log4j config # rootLogger log level may be programmatically overridden by -Dsolr.log.level solr.log=${solr.log.dir} log4j.rootLogger=WARN, file, CONSOLE # Console appender will be programmatically disabled when Solr is started with option -Dsolr.log.muteconsole log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.EnhancedPatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n #- size rotation with log cleanup. log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.MaxFileSize=4MB log4j.appender.file.MaxBackupIndex=9 #- File to log to and log format log4j.appender.file.File=${solr.log}/solr.log log4j.appender.file.layout=org.apache.log4j.EnhancedPatternLayout log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n # Adjust logging levels that should differ from root logger log4j.logger.org.apache.zookeeper=WARN log4j.logger.org.apache.hadoop=WARN log4j.logger.org.eclipse.jetty=WARN log4j.logger.org.eclipse.jetty.server.Server=INFO log4j.logger.org.eclipse.jetty.server.ServerConnector=INFO # set to INFO to enable infostream log messages log4j.logger.org.apache.solr.update.LoggingInfoStream=OFF log4j.logger.org.apache.solr.schema.FieldTypePluginLoader=ERROR log4j.logger.org.apache.commons.httpclient=WARN log4j.logger.org.apache.solr.servlet.SolrDispatchFilter=INFO log4j.logger.org.alfresco.solr=WARN #log4j.logger.org.alfresco.solr.tracker.AclTracker=ERROR #log4j.logger.org.alfresco.solr.component.AsyncBuildSuggestComponent=INFO
Thank you for your time and help.
Best regards,
Ángel.
06-09-2020 06:50 AM
And why are not using what the documentation states?
./solr/bin/solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
06-09-2020 07:03 AM
Hi @angelborroy
Sorry, I did it also and same results:
angel:/opt/alfresco/alfresco-search-services/solr/bin# ./solr start -a "-Dcreate.alfresco.defaults=alfresco,archive" -force Waiting up to 180 seconds to see Solr running on port 8983 [\] Started Solr server on port 8983 (pid=4716). Happy searching! root@hermes:/opt/alfresco/alfresco-search-services/solr/bin# ./solr status Found 1 Solr nodes: Solr process 4716 running on port 8983 ERROR: Failed to get system information from http://localhost:8983/solr due to: org.apache.http.client.ClientProtocolException: Expected JSON response from server but received: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 404 </title> </head> <body> <h2>HTTP ERROR: 404</h2> <p>Problem accessing /solr/admin/info/system. Reason: <pre> Not Found</pre></p> <hr /> </body> </html> Typically, this indicates a problem with the Solr server; check the Solr server logs for more information.
Best regards,
Ángel.
06-09-2020 07:15 AM
Search the cause in SOLR logs.
What Java version are you using?
06-09-2020 07:35 AM
Hi,
Our java version is Java OpenJDK 8.
Best regards,
Ángel.
06-09-2020 08:01 AM
Try using Java 11.
Explore our Alfresco products with the links below. Use labels to filter content by product module.