Alfresco Search Services 1.3.0.1 doesn't search

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

Alfresco Search Services 1.3.0.1 doesn't search

Hello,

I have Alfresco Community - 6.1.2 (r4fe1d0d0-b205) with Alfresco Search Services 1.3.0.1 installed with the distribution zips.
I followed "Installing and configuring Alfresco Search Services" instructions but the search function doesn't work. I configured it with mutual TLS. My OS is Suse SLES 12 sp4, openJDK 11.

When I try search anything the result is always nothing. Catalina log writes this: Catalina Error 

My alfresco-global.properties:

# SOLR
index.subsystem.name=solr6
solr.secureComms=https
solr.host=hostname
solr.port=8983
solr.port.ssl=8984
solr.base.url=/solr

# ssl encryption
encryption.ssl.keystore.location=${dir.keystore}/ssl.keystore
encryption.ssl.keystore.type=JCEKS
encryption.ssl.keystore.keyMetaData.location=${dir.keystore}/ssl-keystore-passwords.properties
encryption.ssl.truststore.location=${dir.keystore}/ssl.truststore
encryption.ssl.truststore.type=JCEKS
encryption.ssl.truststore.keyMetaData.location=${dir.keystore}/ssl-truststore-passwords.properties

# secret key keystore configuration
encryption.keystore.location=${dir.keystore}/keystore
encryption.keystore.keyMetaData.location=${dir.keystore}/keystore-passwords.properties
encryption.keystore.type=JCEKS

solrcore.properties:

# none, https
alfresco.secureComms=https

# ssl
alfresco.encryption.ssl.keystore.type=JCEKS
#alfresco.encryption.ssl.keystore.provider=
alfresco.encryption.ssl.keystore.location=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/ssl.repo.client.keystore
alfresco.encryption.ssl.keystore.passwordFileLocation=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/ssl-keystore-passwords.properties
alfresco.encryption.ssl.truststore.type=JCEKS
#alfresco.encryption.ssl.truststore.provider=
alfresco.encryption.ssl.truststore.location=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/ssl.repo.client.truststore
alfresco.encryption.ssl.truststore.passwordFileLocation=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/keystore/ssl-truststore-passwords.properties

solr.in.sh:

SOLR_PORT=8983

# Uncomment to set SSL-related system properties
# Be sure to update the paths to the correct keystore for your environment
SOLR_SSL_KEY_STORE=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/ssl.repo.client.keystore
SOLR_SSL_KEY_STORE_PASSWORD=keystore
SOLR_SSL_KEY_STORE_TYPE=JCEKS
SOLR_SSL_TRUST_STORE=<ALFRESCO_INSTALL_DIR>/solr6/solrhome/keystore/ssl.repo.client.truststore
SOLR_SSL_TRUST_STORE_PASSWORD=truststore
SOLR_SSL_TRUST_STORE_TYPE=JCEKS
SOLR_SSL_NEED_CLIENT_AUTH=true
SOLR_SSL_WANT_CLIENT_AUTH=false

Thanks & Regards.

 

3 Replies
Highlighted
Established Member

Re: Alfresco Search Services 1.3.0.1 doesn't search

Alfesco is not able to find solr. You should check solr logs to see whether it started up properly, and check solr configuration properties too.

Highlighted
Member II

Re: Alfresco Search Services 1.3.0.1 doesn't search

Hello,

my solr.log starts in this way (whole file here) :

2020-03-26 16:08:41.807 INFO  (main) [   ] o.e.j.s.Server jetty-9.3.14.v20161028
2020-03-26 16:08:42.278 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter  ___      _       Welcome to Apache Solr™ version 6.6.5
2020-03-26 16:08:42.279 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on port 8983
2020-03-26 16:08:42.279 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: /opt/alfresco/alfresco-ce-6.1/solr6/solr
2020-03-26 16:08:42.288 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time: 2020-03-26T16:08:42.281002Z
2020-03-26 16:08:42.291 INFO  (main) [   ] o.a.s.s.StartupLoggingUtils Property solr.log.muteconsole given. Muting ConsoleAppender named CONSOLE
2020-03-26 16:08:42.342 DEBUG (main) [   ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
2020-03-26 16:08:42.343 INFO  (main) [   ] o.a.s.c.SolrResourceLoader Using system property solr.solr.home: /opt/alfresco/alfresco-ce-6.1/solr6/solrhome
2020-03-26 16:08:42.343 DEBUG (main) [   ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: '/opt/alfresco/alfresco-ce-6.1/solr6/solrhome'
2020-03-26 16:08:42.344 DEBUG (main) [   ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
2020-03-26 16:08:42.349 INFO  (main) [   ] o.a.s.c.SolrXmlConfig Loading container configuration from /opt/alfresco/alfresco-ce-6.1/solr6/solrhome/solr.xml
2020-03-26 16:08:42.367 DEBUG (main) [   ] o.a.x.FactoryHelper 1 Error reading :file:/opt/alfresco/jdk/jdk-11/lib/javax.xml.parsers.DocumentBuilderFactory.properties
java.io.FileNotFoundException: /opt/alfresco/jdk/jdk-11/lib/javax.xml.parsers.DocumentBuilderFactory.properties (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
	at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
	at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:184)
	at java.base/java.net.URL.openStream(URL.java:1117)
	at org.alfresco.xmlfactory.FactoryHelper.getProperties(FactoryHelper.java:366)
	at org.alfresco.xmlfactory.FactoryHelper.getProperty(FactoryHelper.java:353)
	at org.alfresco.xmlfactory.FactoryHelper.getConfiguration(FactoryHelper.java:285)
	at org.alfresco.xmlfactory.DocumentBuilderFactoryXercesImpl.<clinit>(DocumentBuilderFactoryXercesImpl.java:33)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:779)
	at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
	at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1394)
	at java.xml/javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:288)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.xml/javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:283)
	at java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:261)
	at java.xml/javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:140)
	at org.apache.solr.core.Config.<init>(Config.java:117)
	at org.apache.solr.core.SolrXmlConfig.fromInputStream(SolrXmlConfig.java:133)
	at org.apache.solr.core.SolrXmlConfig.fromFile(SolrXmlConfig.java:116)
	at org.apache.solr.core.SolrXmlConfig.fromSolrHome(SolrXmlConfig.java:144)
	at org.apache.solr.servlet.SolrDispatchFilter.loadNodeConfig(SolrDispatchFilter.java:274)
	at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:242)
	at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:173)
	at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:137)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:873)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:458)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
	at org.eclipse.jetty.server.Server.start(Server.java:422)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:389)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1516)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1441)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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)
2020-03-26 16:08:42.376 DEBUG (main) [   ] o.a.x.FactoryHelper 1 Error reading :file:/opt/alfresco/jdk/jdk-11/lib/javax.xml.parsers.DocumentBuilderFactory.properties
java.io.FileNotFoundException: /opt/alfresco/jdk/jdk-11/lib/javax.xml.parsers.DocumentBuilderFactory.properties (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
	at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
	at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:184)
	at java.base/java.net.URL.openStream(URL.java:1117)
	at org.alfresco.xmlfactory.FactoryHelper.getProperties(FactoryHelper.java:366)
	at org.alfresco.xmlfactory.FactoryHelper.getProperty(FactoryHelper.java:353)
	at org.alfresco.xmlfactory.FactoryHelper.getConfiguration(FactoryHelper.java:285)
	at org.alfresco.xmlfactory.DocumentBuilderFactoryXercesImpl.<clinit>(DocumentBuilderFactoryXercesImpl.java:35)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:779)
	at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
	at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1394)
	at java.xml/javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:288)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.xml/javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:283)
	at java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:261)
	at java.xml/javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:140)
	at org.apache.solr.core.Config.<init>(Config.java:117)
	at org.apache.solr.core.SolrXmlConfig.fromInputStream(SolrXmlConfig.java:133)
	at org.apache.solr.core.SolrXmlConfig.fromFile(SolrXmlConfig.java:116)
	at org.apache.solr.core.SolrXmlConfig.fromSolrHome(SolrXmlConfig.java:144)
	at org.apache.solr.servlet.SolrDispatchFilter.loadNodeConfig(SolrDispatchFilter.java:274)
	at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:242)

And the logging in the console show this:

Capture.JPG

I reviewed all configuration files of solr and are ok acording the documention.

 

Thanks

Highlighted
Established Member

Re: Alfresco Search Services 1.3.0.1 doesn't search

Ok, the error now looks different... Looking at solr console seems that solr is not able to see alfresco neither, but looking at the logs seems that solr is not starting properly.

I've never seen the error shown in the logs, so let's check a couple of things. 

Firts of all, check that you have properly set JAVA_HOME environment variable. After that, check that solr is correctly getting this variable. It must be set in some of the init scripts, maybe solr.in.sh.

Finally, check that alfresco.port property is correctly set in both cores, if they already exist, alfresco and archive, specially if you are running Alfresco in another port than 8080. We found a weird behaviour when trying to set a different port for Alfresco in main solrcore.properties, solr did not take the value from there for both cores, we had to set the value in specific solrcore properties file for both cores once created.

Hope it helps to troubleshoot your problem!