Solr index locked for all cores at startup

57 views
Skip to first unread message

Stefano Bocconi

unread,
Jun 14, 2017, 5:59:22 AM6/14/17
to DSpace Technical Support
Hi,
I constantly get the Error creating core [x]: Index locked for write for core x for all Solr cores (search, statistics, oai, authority).

I have stopped tomcat, deleted the lock files and restarted but they reappear immediately. I have also temporarily excluded the oai core from the conf file, but the lock appears on the others.

I am using Dspace 5.6 with modifications mostly to the input-form.xml and registry files, but not to the code.

I attach the Solr log file. Pointers to where to look for appreciated.

Thanks,
  Stefano Bocconi
Solr.log

helix84

unread,
Jun 14, 2017, 7:21:48 AM6/14/17
to Stefano Bocconi, DSpace Technical Support
Just an idea - is it possible that you're loading the dspace-solr
webapp twice? E.g. a duplicate <Context> declaration or a duplicate
context fragment?


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
> --
> 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 post to this group, send email to dspac...@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.

Stefano Bocconi

unread,
Jun 14, 2017, 4:53:29 PM6/14/17
to hel...@centrum.sk, DSpace Technical Support
You are right, I have checked and I have everything twice,

This is related to the fact that I have used a different path than the root, but I have not defined context twice, this is my server.xml

 <Host name="localhost"  appBase="/home/dspace/dspace/webapps"
            unpackWARs="true" autoDeploy="true">

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

       <Context docBase="rest" path="/dspace/rest"></Context>
<!--<Context docBase="sword" path="dspace/sword"></Context>
<Context docBase="swordv2" path="dspace/swordv2"></Context>-->
<Context docBase="xmlui" path="/dspace/xmlui"></Context>
<Context docBase="jspui" path="/dspace/jspui"></Context>
<Context docBase="solr" path="/dspace/solr"></Context>
<!--<Context docBase="oai" path="dspace/oai"></Context>-->
</Host>

Apparently the context with /solr (i.d. without the dspace prefix) is defined somewhere else, but I need to find out where ….

Thanks a lot!

Stefano
signature.asc

Mark H. Wood

unread,
Jun 15, 2017, 9:25:57 AM6/15/17
to DSpace Technical Support, hel...@centrum.sk
You have explicitly declared a Context for each of the webapp.s, and also have an appBase pointing at what appears to be the target of a DSpace installation, with autoDeploy='true'.  So you've told Tomcat to load individual webapp.s from various directories under /dspace and *also* to deploy any webapp.s found in the directory /home/dspace/dspace/webapps.  Probably you need one or the other.  I would remove or comment out the <Context> elements.  (The Tomcat maintainers discourage the use of <Context> in server.xml, although it does work.  If you need full control over a Context, you can define it in a separate file as described in the Tomcat documentation, but then don't place the webapp.s in the appBase directory.)

https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace#InstallingDSpace-Installation lays out two ways of deploying DSpace in Tomcat, which you may find helpful.

Message has been deleted

Stefano Bocconi

unread,
Jun 29, 2017, 8:18:07 AM6/29/17
to Mark H. Wood, DSpace Technical Support, hel...@centrum.sk
Hi Mark,

Thanks again for your explanation, at the end I removed the auto deploy from the appBase Host (and kept the Contexts)  as I need to control the path of the web apps and also which one are deployed.

Stefano

On 15 Jun 2017, at 15:25, Mark H. Wood <mwood...@gmail.com> wrote:

You have explicitly declared a Context for each of the webapp.s, and also have an appBase pointing at what appears to be the target of a DSpace installation, with autoDeploy='true'.  So you've told Tomcat to load individual webapp.s from various directories under /dspace and *also* to deploy any webapp.s found in the directory /home/dspace/dspace/webapps.  Probably you need one or the other.  I would remove or comment out the <Context> elements.  (The Tomcat maintainers discourage the use of <Context> in server.xml, although it does work.  If you need full control over a Context, you can define it in a separate file as described in the Tomcat documentation, but then don't place the webapp.s in the appBase directory.)

https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace#InstallingDSpace-Installation lays out two ways of deploying DSpace in Tomcat, which you may find helpful.


--
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/FLE1oXDt-vU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages