You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DOCS] Fix keystore creation instructions for Docker (#77155) (#77561)
Currently, our Docker install docs instruct users to directly bind-mount the `elasticsearch.keystore` file. This can lead to errors:
* If the keystore file doesn't already exist, Docker's `-v` flag will create `elasticsearch.keystore` as a directory. This will block the creation of the keystore file.
* To add or update secure settings, the container needs access to other files in the `config` directory, such as `keystore.tmp`.
This updates the Docker install docs to instruct users to bind-mount the `config` directory rather than `elasticsearch.keystore`. It also adds troubleshooting tips for errors related to the keystore.
Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Stef Nestor <[email protected]>
@@ -433,4 +470,48 @@ You must explicitly accept them either by:
433
470
See {plugins}/_other_command_line_parameters.html[Plugin management]
434
471
for more information.
435
472
473
+
[[troubleshoot-docker-errors]]
474
+
==== Troubleshoot Docker errors for {es}
475
+
476
+
Here’s how to resolve common errors when running {es} with Docker.
477
+
478
+
===== elasticsearch.keystore is a directory
479
+
480
+
[source,txt]
481
+
----
482
+
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore") Likely root cause: java.io.IOException: Is a directory
483
+
----
484
+
485
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
486
+
to directly bind-mount an `elasticsearch.keystore` file that doesn't exist. If
487
+
you use the `-v` or `--volume` flag to mount a file that doesn't exist, Docker
488
+
instead creates a directory with the same name.
489
+
490
+
To resolve this error:
491
+
492
+
. Delete the `elasticsearch.keystore` directory in the `config` directory.
493
+
. Update the `-v` or `--volume` flag to point to the `config` directory path
494
+
rather than the keystore file's path. For an example, see
495
+
<<docker-keystore-bind-mount>>.
496
+
. Retry the command.
497
+
498
+
===== elasticsearch.keystore: Device or resource busy
499
+
500
+
[source,txt]
501
+
----
502
+
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.keystore.tmp -> /usr/share/elasticsearch/config/elasticsearch.keystore: Device or resource busy
503
+
----
504
+
505
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
506
+
to directly bind-mount the `elasticsearch.keystore` file. To update the
507
+
keystore, the container requires access to other files in the `config`
508
+
directory, such as `keystore.tmp`.
509
+
510
+
To resolve this error:
511
+
512
+
. Update the `-v` or `--volume` flag to point to the `config` directory
513
+
path rather than the keystore file's path. For an example, see
0 commit comments