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) (#77560)
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]>
@@ -446,4 +483,48 @@ You must explicitly accept them either by:
446
483
See {plugins}/_other_command_line_parameters.html[Plugin management]
447
484
for more information.
448
485
486
+
[[troubleshoot-docker-errors]]
487
+
==== Troubleshoot Docker errors for {es}
488
+
489
+
Here’s how to resolve common errors when running {es} with Docker.
490
+
491
+
===== elasticsearch.keystore is a directory
492
+
493
+
[source,txt]
494
+
----
495
+
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
496
+
----
497
+
498
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
499
+
to directly bind-mount an `elasticsearch.keystore` file that doesn't exist. If
500
+
you use the `-v` or `--volume` flag to mount a file that doesn't exist, Docker
501
+
instead creates a directory with the same name.
502
+
503
+
To resolve this error:
504
+
505
+
. Delete the `elasticsearch.keystore` directory in the `config` directory.
506
+
. Update the `-v` or `--volume` flag to point to the `config` directory path
507
+
rather than the keystore file's path. For an example, see
508
+
<<docker-keystore-bind-mount>>.
509
+
. Retry the command.
510
+
511
+
===== elasticsearch.keystore: Device or resource busy
512
+
513
+
[source,txt]
514
+
----
515
+
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
516
+
----
517
+
518
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
519
+
to directly bind-mount the `elasticsearch.keystore` file. To update the
520
+
keystore, the container requires access to other files in the `config`
521
+
directory, such as `keystore.tmp`.
522
+
523
+
To resolve this error:
524
+
525
+
. Update the `-v` or `--volume` flag to point to the `config` directory
526
+
path rather than the keystore file's path. For an example, see
0 commit comments