FS#65022 - [elasticsearch] starting crashes with ExecStartPre elasticsearch-keystore upgrade

Attached to Project: Community Packages
Opened by Johannes Dewender (JonnyJD) - Thursday, 02 January 2020, 23:24 GMT
Last edited by Toolybird (Toolybird) - Sunday, 30 April 2023, 08:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I had elasticsearch running on a different Arch Linux machine, installed some months ago.
I tried to do the same on this other Arch machine and starting elasticsearch (no index) fails at the keystore upgrade step:

Process: 94942 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade (code=exited, status=134)

Jan 03 00:09:59 thinktux systemd[1]: Starting Elasticsearch...
Jan 03 00:09:59 thinktux systemd[1]: elasticsearch.service: Control process exited, code=exited, status=134/n/a
Jan 03 00:09:59 thinktux systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Jan 03 00:09:59 thinktux systemd[1]: Failed to start Elasticsearch.

The only thing I can find in the log is a multi-thread stacktrace for Java.
I am running OpenJDK 8 currently (I found a warning that this will be deprecated in favor of Java 11, the other system was also not running Java 11)

The problem goes away when I remove this line from the service file:
ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade

Starting elasticsearch-keystore manually, as root or elasticsearch user works fine (Java 11 warning, but fine otherwise).
So potentially one service file setting that doesn't work nicely (with my setup).

I had elasticsearch 1.7 installed on this machine first, so I removed the folders in /etc /var/lib, /var/log, /usr/share and /tmp before installing ES 7.


Additional info:
* package version(s)
elasticsearch 7.5.0-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
* Uninstall elasticsearch and all config/indexes
* install elasticsearch
* sudo systemctl start elasticsearch
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 30 April 2023, 08:05 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Pkg was dropped to the AUR Jan '22.
Comment by Johannes Dewender (JonnyJD) - Friday, 03 January 2020, 11:45 GMT
I added the stack trace of the java treads that is generated by the crash.
Not sure this is of any help, but I don't want to leave out anything.

Note that this is not a stack trace from a Java Exception (which would be helpful, but doesn't exist), but a stack trace of the actual JVM.
Comment by Johannes Dewender (JonnyJD) - Friday, 03 January 2020, 11:51 GMT
On the machine where Elasticsearch is running fine this version of the Arch Linux package is installed:
elasticsearch 7.3.2-1
(where elasticsearch-keystore upgrade is not yet running)

Loading...