ERROR o.x.e.s.s.i.SolrEventStore - Failed to commit

I’m trying to upgrade my XWiki to 12.10.3, and it seems to be working well except for this log that always appears when I save a page. I’m not understanding what it’s trying to tell me. Can anyone give me a hint?

2021-01-29 18:12:53,984 [Asynchronous handler for event store [solr]] ERROR o.x.e.s.s.i.SolrEventStore - Failed to commit
org.xwiki.eventstream.EventStreamException: Failed to commit
at org.xwiki.eventstream.store.solr.internal.SolrEventStore.commit(SolrEventStore.java:382)
at org.xwiki.eventstream.store.solr.internal.SolrEventStore.afterTasks(SolrEventStore.java:164)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.processTasks(AbstractAsynchronousEventStore.java:347)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.run(AbstractAsynchronousEventStore.java:325)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: null
at org.xwiki.eventstream.store.solr.internal.SolrEventStore.commit(SolrEventStore.java:380)
… 4 common frames omitted
2021-01-29 18:12:53,985 [Asynchronous handler for event store [solr]] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.eventstream.events.EventStreamAddedEvent@5eafd710] to listener [org.xwiki.notifications.notifiers.internal.UserEventDispatcherListener@5f669f31]
java.lang.NullPointerException: null
at org.xwiki.notifications.notifiers.internal.UserEventDispatcherListener.prefilterEvent(UserEventDispatcherListener.java:126)
at org.xwiki.notifications.notifiers.internal.UserEventDispatcherListener.onEvent(UserEventDispatcherListener.java:106)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:337)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.complete(AbstractAsynchronousEventStore.java:441)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.afterTasks(AbstractAsynchronousEventStore.java:523)
at org.xwiki.eventstream.store.solr.internal.SolrEventStore.afterTasks(SolrEventStore.java:169)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.processTasks(AbstractAsynchronousEventStore.java:347)
at org.xwiki.eventstream.internal.AbstractAsynchronousEventStore.run(AbstractAsynchronousEventStore.java:325)
at java.base/java.lang.Thread.run(Thread.java:834)

What I have found on startup looks like:

2021-01-29 16:18:18,927 [localhost-startStop-1] INFO o.x.s.s.i.EmbeddedSolr - Started embedded Solr server.
2021-01-29 16:18:19,069 [localhost-startStop-1] ERROR o.a.s.s.ManagedIndexSchema - Field type ‘strings’ already exists.
2021-01-29 16:18:19,071 [localhost-startStop-1] ERROR o.a.s.h.RequestHandlerBase - org.apache.solr.api.ApiBag$ExceptionWithErrObject: error processing commands, errors: [{add-field-type={name=strings, sortMissingLast=true, docValues=true, multiValued=true, class=org.apache.solr.schema.StrField}, errorMessages=[Field type ‘strings’ already exists.
]}],
at org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:92)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:211)

2021-01-29 16:18:19,081 [localhost-startStop-1] ERROR o.x.s.s.i.EmbeddedSolr - Failed to create the Solr client for core with name [events]
org.xwiki.search.solr.SolrException: Failed to add a field type in the Solr core
at org.xwiki.search.solr.AbstractSolrCoreInitializer.setFieldType(AbstractSolrCoreInitializer.java:1004)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.setFieldType(AbstractSolrCoreInitializer.java:973)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.setFieldType(AbstractSolrCoreInitializer.java:958)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.addFieldType(AbstractSolrCoreInitializer.java:924)

Replying to my own… I was able to rid myself of the errors by removing the solr subdirectories under my data dir:
/var/lib/xwiki/data/solr
/var/lib/xwiki/data/store/solr
/var/lib/xwiki/data/cache/solr

Restarted and reindexed. Messages are gone and search seems to still work.

Is there any downsides to having done this?
-Alan

Solr is used for a lot more than search these days.

This actually have nothing to do with the search, Solr is also used to store notifications. This error means that the code which store events in Solr did not understand a specific event but not really sure why. If you find a way to reproduce this error I would be very interested.

Again an error related to the event Solr core and not the search one but without a more complete error I’m not sure why it failed to add the new field type.

This folder is not used anymore.

This deleted the entire embedded Solr instance which means you deleted the following:

  • notifications (but for now you can get them back by going to the admin and migrate them since they are still duplicated in the database)
  • ratings and likes (those are lost for good)

This contains the index of the search and a cache of available remote extensions. As “cache” in the path suggest deleting that is not a problem (provided you don’t do it while XWiki is running).