snapshot was created with version 5.x (possibly 5.4.x or 5.5.x; I can't recall exactly, it was created somewhere early fall of 2017 and at the time latest version of elasticsearch was used).
root@bckp:~# docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "path.repo=/mnt/bckp/backups" --rm docker.elastic.co/elasticsearch/elasticsearch:5.6.5
[2018-01-09T05:17:55,673][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.repo' (/mnt/bckp/backups)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.5.jar:5.6.5]
Caused by: java.lang.IllegalStateException: Unable to access 'path.repo' (/mnt/bckp/backups)
at org.elasticsearch.bootstrap.Security.addPath(Security.java:450) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:332) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:246) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.configure(Security.java:119) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.5.jar:5.6.5]
... 6 more
Caused by: java.nio.file.AccessDeniedException: /mnt/bckp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_151]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_151]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_151]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_151]
at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_151]
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_151]
at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_151]
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:492) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.addPath(Security.java:448) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:332) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:246) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Security.configure(Security.java:119) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.5.jar:5.6.5]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.5.jar:5.6.5]
... 6 more
root@bckp:~#
Caused by: java.nio.file.AccessDeniedException: /mnt/bckp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_151]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_151]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_151]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_151]
at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_151]
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_151]
at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_151]
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:492) ~[elasticsearch-5.6.5.jar:5.6.5]
What @ywelsch said. It doesn't look like /mnt/bckp/ is actually visible inside the container and the registration fails when elastic tries to create this directory.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.