After starting tomcat - webserver is not responding (perhaps solr related)

I’m using xwiki debian package with debian 11.

Really often tomcat is not responding after start (I can test this using w3m http://IP:8080) so I have to restart tomcat repeatly (systemctl stop tomcat9.service && sleep 10 %% systemctl start tomcat9.service) 1 to more than 20 times ;-(

I can’t find anythin in /var/log/tomcat9/* to point to a possible reason.

If tomcat is not responding the logs ends with:

[2021-05-05 08:36:34] [warning] The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
[2021-05-05 08:36:39] [info] 2021-05-05 08:36:39,400 [main] INFO iPropertiesConfigurationSource - Loading [xwiki.properties] from default location [/etc/xwiki/xwiki.properties]
[2021-05-05 08:36:39] [info] 2021-05-05 08:36:39,594 [main] INFO o.x.e.i.ServletEnvironment - Using permanent directory [/var/lib/xwiki/data]
[2021-05-05 08:36:56] [info] 2021-05-05 08:36:56,295 [main] INFO o.x.s.s.i.EmbeddedSolr - Starting embedded Solr server…
[2021-05-05 08:36:56] [info] 2021-05-05 08:36:56,296 [main] INFO o.x.s.s.i.EmbeddedSolr - Using Solr home directory: [/var/lib/xwiki/data/store/solr]

In the cases tomcat starts correctly log files contionues at this position with:

[2021-05-05 09:06:17] [info] 2021-05-05 09:06:17,486 [main] INFO o.x.s.s.i.EmbeddedSolr - Started embedded Solr server.
[2021-05-05 09:06:20] [info] WARNING: An illegal reflective access operation has occurred
[2021-05-05 09:06:20] [info] WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.reflection.FieldDictionary (file:/usr/lib/xwiki/WEB-INF/lib/xstream-1.4.16.jar) to field java.util.Collections$Unm
[2021-05-05 09:06:20] [info] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.converters.reflection.FieldDictionary
[2021-05-05 09:06:20] [info] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[2021-05-05 09:06:20] [info] WARNING: All illegal access operations will be denied in a future release
[2021-05-05 09:06:21] [info] 2021-05-05 09:06:21,571 [main] INFO o.x.s.f.i.FilesystemStoreTools - Using filesystem store directory [/var/lib/xwiki/data/store/file]

So I think somewhere with “solr” may be the reason.

How can I dig more into it? How to get tomcat starting withot errors?

regards, Ronny

It looks like https://jira.xwiki.org/browse/XWIKI-18436, see https://jira.xwiki.org/browse/XWIKI-18436?focusedCommentId=108620&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-108620 if you upgraded to a fixed version and still have the issue.

Thanks for the fast reply.

I’m using xwiki 13.3 so the mentioned solr-issue should be fixed in this version.
As workaround you mean I should add the Line “loadOnStartup=false” in

/var/lib/xwiki/data/store/solr/events/core.properties
/var/lib/xwiki/data/store/solr/like/core.properties
/var/lib/xwiki/data/store/solr/search/core.properties
/var/lib/xwiki/data/store/solr/extension_index/core.properties
/var/lib/xwiki/data/store/solr/ratings/core.properties

?

Yes. It will make Solr initialize those cores only the first time they are used instead of all at once which will reduce a lot the likelihood of hitting the Solr lock bug.