SOLR/Tomcat config issue

109 views
Skip to first unread message

Scott Renton

unread,
Jan 6, 2020, 12:44:50 PM1/6/20
to DSpace Technical Support
Hi folks

Quick one to see if anyone has a similar use case. I've got a v6 dspace installation, and I need the solr exposed so that receiving websites can work with its data. 
On the old version, which was a v1.8.1 with old-school SOLR, I could define the solr web app twice in config, once as localhost, and once under a URL. I suspect it is not as simple as "I could define it as many times as I want" though- there may be something governing this from outside.

When I do this in v6...

If I disable the localhost config, discovery does not take place in dspace, so that's a non-starter (but I CAN use the solr admin panel, and my receiving websites work).

If I define it in both places, attempts to access the solr data through the admin panel fail due to lockout (see below). Clearing write locks from the index has no effect, I should mention!


SolrCore Initialization Failures
search: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Index locked for write for core search
oai: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Index locked for write for core oai
authority: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Index locked for write for core authority
statistics: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Index locked for write for core statistics

The basic server.xml hosts (solr only for clarity) look like this. 

       <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
       <Context path="/solr" docBase="/home/lib/dspace/dspace/webapps/solr" reloadable="true" cachingAllowed="false" allowLinking="true"/>
      </Host>

      <Host name="test.collectionsmanager.is.ed.ac.uk"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <!--<Context path="/solr" docBase="/home/lib/dspace/dspace/webapps/solr" reloadable="true" cachingAllowed="false" allowLinking="true"/>-->
        <Context path="/solr" docBase="/home/lib/dspace/dspace/webapps/solr" reloadable="true" cachingAllowed="false" allowLinking="true">
              <Parameter name="LocalHostRestrictionFilter.localhost" value="false" override="false" />
              <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="129\.215\.\d+\.\d+"/>
        </Context>
      </Host>
      
(without LocalHostRestrictionFilter set, I could not even see the solr admin panel)
      
discovery.cfg has the defaults (
##### Search Indexing #####

discovery.search.server = ${solr.server}/search

)

local.cfg has the default

solr.server = http://localhost:8080/solr



Obviously the old and new solrconfig.xml files are very different, but it looks as though the old uses simple as lockType, and the new uses native. Both have unlockOnStartup set to false.

There will be a config permutation that works, I'm sure, but I've not found it yet!

Cheers
Scott

Hardy Pottinger

unread,
Jan 6, 2020, 5:09:49 PM1/6/20
to Scott Renton, DSpace Technical Support
Hi, Scott, you might be interested in the following advice from the Solr security wiki page:


"If there is a need to provide query access to a Solr server from the open internet, it is highly recommended to use a proxy, such as one of these."


--Hardy

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4f5e1c06-8add-451e-94dd-17ff84bf7142%40googlegroups.com.

Scott Renton

unread,
Jan 8, 2020, 6:57:35 AM1/8/20
to DSpace Technical Support
Thanks very much Hardy- I hadn't seen these. The URL is firewalled to the stuff that needs it, but this may be a better way.

I think my problem is at an earlier stage in the process. Perhaps I should word it differently: does anyone know how to configure the solr webapp in tomcat so internal (localhost) discovery works, AND the solr index can be reached externally?

Cheers
Scott
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages