-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set RuntimeDirectory in systemd service #23526
Conversation
This instruction tells systemd to create a directory /var/run/elasticsearch before starting Elasticsearch. Without this change, the default PID_DIR (/var/run/elasticsearch) may not exist, and without it, Elasticsearch will fail to start.
/cc @jpcarey who described the problem to me. I was able to reproduce[*] the problem he described that /var/run/elasticsearch may not exist, and systemd was not creating it, and the elasticsearch service would fail to start without the directory. [*] My reproduction was not with elasticsearch's systemd service, but with a much simpler one to test systemd's behavior with respect to /var/run. Without |
This directory is created during installation, so I'm not sure I understand how this situation could have arisen?
|
On fedora and possibly other red hat systems, /var/run is a symlink to
/run, and /run is a tmpfs that is destroyed on system shutdown, so this
directory is new every time the system boots.
…On Thu, Mar 9, 2017 at 2:08 PM Jason Tedor ***@***.***> wrote:
This directory is created during installation, so I'm not sure I
understand how this situation could have arisen?
$ rpm -qlp elasticsearch-5.2.2.rpm | grep /var/run/elasticsearch
warning: elasticsearch-5.2.2.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
/var/run/elasticsearch
$ dpkg -c elasticsearch-5.2.2.deb | grep /var/run/elasticsearch
drwxr-xr-x elasticsearch/elasticsearch 0 2017-02-24 17:29 ./var/run/elasticsearch/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23526 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIC6vyOWNyr046pPxxrnL9iLtmwTCFrks5rkHh5gaJpZM4MYpkX>
.
|
We provide |
@jordansissel Given the existence of the tmpfiles configuration @jasontedor mentioned, can this PR be closed? |
I heard, but cannot confirm, that those encountering this did not have the I had the If you manually invoke Rerunning the same test, but adding I would be in favor of adding the https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
|
Given than it's possible |
I'm good with this having been integrated after yesterday seeing another user run into a problem with their |
This instruction tells systemd to create a directory /var/run/elasticsearch before starting Elasticsearch. Without this change, the default PID_DIR (/var/run/elasticsearch) may not exist, and without it, Elasticsearch will fail to start.
This instruction tells systemd to create a directory /var/run/elasticsearch before starting Elasticsearch. Without this change, the default PID_DIR (/var/run/elasticsearch) may not exist, and without it, Elasticsearch will fail to start.
I cherry-picked this to 6.0 and 6.x too. |
Thanks Jason! |
I opened #26229 to add a test too. |
❤️ |
* master: (458 commits) Prevent cluster internal `ClusterState.Custom` impls to leak to a client (elastic#26232) Add packaging test for systemd runtime directive [TEST] Reenable RareClusterStateIt#testDeleteCreateInOneBulk Serialize and expose timeout of acknowledged requests in REST layer (elastic#26189) (refactor) some opportunities to use diamond operator (elastic#25585) [DOCS] Clarified readme for testing a single page Settings: Add keystore.seed auto generated secure setting (elastic#26149) Update version information (elastic#25226) "result" : created -> "result" : "created" (elastic#25446) Set RuntimeDirectory (elastic#23526) Drop upgrade from full cluster restart tests (elastic#26224) Further improve docs for requests_per_second Docs disambiguate reindex's requests_per_second (elastic#26185) [DOCS] Cleanup link for ec2 discovery (elastic#26222) Fix document field equals and hash code test Use holder pattern for lazy deprecation loggers Settings: Add keystore creation to add commands (elastic#26126) Docs: Cleanup docs for ec2 discovery (elastic#26065) Fix NPE when `values` is omitted on percentile_ranks agg (elastic#26046) Several internal improvements to internal test cluster infra (elastic#26214) ...
This instruction tells systemd to create a directory /var/run/elasticsearch before starting Elasticsearch.
Without this change, the default PID_DIR (/var/run/elasticsearch) may not exist, and without it, Elasticsearch will fail to start.