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
If the keystore is mounted incorrectly, it will induce example Docker errors from attempting to
403
+
To encrypt your secure settings with a password and have them persist outside
404
+
the container, use a `docker run` command to manually create the keystore
405
+
instead. The command must:
417
406
418
-
- add keystore to running container without full reference
407
+
* Bind-mount the `config` directory. The command will create an
408
+
`elasticsearch.keystore` file in this directory. To avoid errors, do
409
+
not directly bind-mount the `elasticsearch.keystore` file's path.
410
+
* Use the `elasticsearch-keystore` tool with the `create` option.
411
+
* Provide a keystore password using the `KEYSTORE_PASSWORD` or
412
+
`KEYSTORE_PASSWORD_FILE` environment variables. Alternatively, you can use
413
+
`elasticsearch-keystore` tool's `-p` option to use a password prompt.
419
414
420
-
[source,sh]
421
-
--------------------------------------------
422
-
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
423
-
--------------------------------------------
424
-
425
-
- mount direct file rather than parent directory
426
-
427
-
[source,sh]
428
-
--------------------------------------------
429
-
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore")
430
-
Likely root cause: java.io.IOException: Is a directory
431
-
--------------------------------------------
415
+
ifeval::["{release-state}"!="unreleased"]
416
+
For example:
432
417
433
-
Versus a working example keystore mounting with update example would be
@@ -486,4 +485,48 @@ You should use `centos:8` as a base in order to avoid incompatibilities.
486
485
Use http://man7.org/linux/man-pages/man1/ldd.1.html[`ldd`] to list the
487
486
shared libraries required by a utility.
488
487
488
+
[[troubleshoot-docker-errors]]
489
+
==== Troubleshoot Docker errors for {es}
490
+
491
+
Here’s how to resolve common errors when running {es} with Docker.
492
+
493
+
===== elasticsearch.keystore is a directory
494
+
495
+
[source,txt]
496
+
----
497
+
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
498
+
----
499
+
500
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
501
+
to directly bind-mount an `elasticsearch.keystore` file that doesn't exist. If
502
+
you use the `-v` or `--volume` flag to mount a file that doesn't exist, Docker
503
+
instead creates a directory with the same name.
504
+
505
+
To resolve this error:
506
+
507
+
. Delete the `elasticsearch.keystore` directory in the `config` directory.
508
+
. Update the `-v` or `--volume` flag to point to the `config` directory path
509
+
rather than the keystore file's path. For an example, see
510
+
<<<<docker-keystore-bind-mount>>.
511
+
. Retry the command.
512
+
513
+
===== elasticsearch.keystore: Device or resource busy
514
+
515
+
[source,txt]
516
+
----
517
+
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
518
+
----
519
+
520
+
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
521
+
to directly bind-mount the `elasticsearch.keystore` file. To update the
522
+
keystore, the container requires access to other files in the `config`
523
+
directory, such as `keystore.tmp`.
524
+
525
+
To resolve this error:
526
+
527
+
. Update the `-v` or `--volume` flag to point to the `config` directory
528
+
path rather than the keystore file's path. For an example, see
0 commit comments