Topic on Extension talk:CirrusSearch

Spas.Z.Spasov (talkcontribs)

I've moved our ElasticSearch server to an another machine, which is running Ubuntu 20.04 and where were installed the package default-jre, which contains Java 11 and the package elasticsearch-6.5.4.deb. The MediaWiki's version is 1.34 and the port 9200 is forwarded via SSH.

Then I've rebuild the search index according to the instructions provided in the README file. Everything went well.

Unfortunately when I tried to use the search feature of the wiki, by the web interface, I received the message: We could not complete your search due to a temporary problem. Please try again later.

After a while, I found the ElasticSearch service is dead, with the following reason:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely...

So in order to get ElasticSearch operational I've switched to Java 8 (reference) by using the following commands:

sudo apt install openjdk-8-jre-headless 
sudo apt install openjdk-8-jdk-headless
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo systemctl restart elasticsearch.service 
curl 'http://127.0.0.1:9200' # do a test

Now everything works great!

I do not know which is the trouble maker Extension:CirrusSearch or the ElasticSearch service, but I think it will be meaningful to include some additional information of the compatibility with the different Java versions.

Regards! Spas Spasov

Kghbln (talkcontribs)

Thanks a lot for sharing this information. Indeed, having a Java compat overview will be great. Perhaps it is already there in the abyss of the extension's (code) docu.

Anyhow the bottom line appears to be that Java 8 is required for recent versions of Cirrus.

Spas.Z.Spasov (talkcontribs)

@Kghbln, I'm happy to do that :) Here is small update:

With my setup elasticsearch-6.5.4.deb constantly crashes after a few hours of work. So I switched back to elasticsearch-5.6.16.deb and it works without problems and need of restart for about a week yet. Despite of within the extension's documentations is written MediaWiki 1.33.x and 1.34.x require Elasticsearch 6.5.x.

Another thing that I remembered, when I started to use Extension:CirrusSearch I wasn't able to made the initial search index, unless changing the MySQL's database name from myWiki to my_wiki (without capital letters).

Kghbln (talkcontribs)

Thanks again for keeping us updated about your experience. I find it strange that ES 6.5.4 works with JDK 8 on Ubuntu 18.04. without issues whereas it appears that you need to use ES 5.6.16 with JDK 8 on Ubuntu 20.04. However you cannot beat reality. Did you track why ES was failing? Probably good to know and report.

The compatibility table in the documentation is based on what the developers of CirrusSearch think it should work with. If there is unofficial compatibility this is even better.

About the database name: I also ran into this earlier and found a then undocumented configuration parameter. Thus you could have done $wgCirrusSearchIndexBaseName = 'mywiki'; to avoid renaming the database name. I added an info about it directly to the extension's page rather than linking to many spots the explore the whole lot. :)

Reply to "Java version compatibility"