AnsweredAssumed Answered

[Community 5.0.d + solr4] solr4 is up but all requests to /solr4/alfresco fail with 404

Question asked by koopa on Nov 5, 2015
Latest reply on Nov 9, 2015 by koopa
Running on Amazon ec2 t2.small, this is my environment:
- debian jessie
- apache2 (listening on port 80) + modjk (tomcat listening on 8080)
- tomcat 7.0.65
- alfresco community 5.0.d
- postgres 9.4
- java 8
- solr4

I choose to set communication between repo and solr4 on plain http, without additional security. So I don't even have a keystore.
These are the main props of <SOLR4 HOME>/archive-SpacesStore/conf/solrcore.properties:

data.dir.root=/opt/alfresco/alf_data/solr4/indexes
data.dir.store=archive/SpacesStore
enable.alfresco.tracking=true
alfresco.version=5.0.0
alfresco.host=localhost
alfresco.port=8080
alfresco.port.ssl=8443
alfresco.baseUrl=/alfresco
alfresco.cron=0/15 * * * * ? *
alfresco.stores=archive://SpacesStore
alfresco.secureComms=none


This is the main part of my alfresco-global.properties:

dir.root=/opt/alfresco/alf_data
#dir.keystore=${dir.root}/keystore

index.recovery.mode=AUTO
#index.recovery.mode=FULL
index.subsystem.name=solr4
solr.host=localhost
solr.port=8080
solr.port.ssl=8443
solr.secureComms=none


This is the solr4 config on tomcat (solr4.xml):

<?xml version="1.0" encoding="utf-8"?>
<Context debug="0" crossContext="true">
  <Environment name="solr/home"        type="java.lang.String" value="/opt/alfresco/solr4" override="true"/>
  <Environment name="solr/model/dir"   type="java.lang.String" value="/opt/alfresco/alf_data/solr4/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/alfresco/alf_data/solr4/content" override="true"/>
</Context>


I do the fresh install of alfresco, share, and finally solr4 war. I can login to /share and even to /solr4. From sol4 console I can see workspace and archive working fine, but after the share login I immediately receive:

2015-11-05 14:01:11,044 ERROR [org.alfresco.repo.site.SiteServiceImpl] [http-bio-8080-exec-4] LuceneQueryParserException with findSites()
org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 10050018 Request failed 404 /solr4/alfresco/afts?wt=json&fl=DBID%2Cscore&r
ows=5&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILT
ER_FROM_JSON
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.postQuery(SolrQueryHTTPClient.java:616)
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.postSolrQuery(SolrQueryHTTPClient.java:559)
        at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:520)
        at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:51)
        at org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage.executeQuery(DbOrIndexSwitchingQueryLanguage.java:214)
        at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)


and that always happens when I try to search content. It looks like it can't find solr4 context (404). But why?

Thanks in advance!

Outcomes