Skip to content

RPM update to 7.5.1 prevents start of elasticsearch #50631

@erempel

Description

@erempel

Platform: Redhat EL 7.7 (systemd)
Previous ES package: elasticsearch-7.4.2-1.x86_64
Upgraded ES package: elasticsearch-7.5.1-1.x86_64

ES forum post at
https://discuss.elastic.co/t/elasticsearch-7-5-1-rpm-update-prevents-restart-of-service/213636

made me look into things more.

After the upgrade and host reboot, the ES service would not start and gave the error

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.elasticsearch.cli.UserException: unable to create temporary keystore at [/etc/elasticsearch/elasticsearch.keystore.tmp], write permissions required for [/etc/elasticsearch] or run [elasticsearch-keystore upgrade]

I can confirm that there is a "posttrans scriptlet" in the RPM used used during the upgrade and that the scriptlet containes the commands to perform the keystore upgrade, and that this scriptet was run at the time of the update (we upgrade automatically starting at 04:00)

% ls -al /etc/elasticsearch/.elasticsearch.keystore.initial_md5sum
-rw-r--r-- 1 root elasticsearch 0 Jan 1 04:34 .elasticsearch.keystore.initial_md5sum

Adding group write permissions to the /etc/elasticsearch directory permitted the service to start, which create or rewrote the keystore file.

% ls -al /etc/elasticsearch/elasticsearch.keystore
-rw-rw---- 1 elasticsearch elasticsearch 199 Jan 2 14:57 elasticsearch.keystore

Two things I note

  1. The posttrans scriptlet sets the owner:group of the keystore file to root:elasticsearch however, after the service started the file is owned by elasticsearch:elasticsearch

  2. The md5sum output file is of size 0, which indicates to me that the posttrans scriptlet failed to create the initial keystore file, or perhaps ran the "else" clause of the posttrans scriptlet which only created the md5sum file.

Metadata

Metadata

Labels

:Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scriptsTeam:DeliveryMeta label for Delivery team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions