elastic / stack-docker

Project no longer maintained.
Apache License 2.0
1.18k stars 450 forks source link

Cannot launch stack on Ubuntu; chdir to cwd permission denied #104

Closed benze closed 4 years ago

benze commented 4 years ago

I'm trying to launch the stack on Linux Mint 18.2 following the instructions in the readme, but am hitting an exception on initial setup. Frankly, I'm not sure which script/container/config file to check against.

I'm running: Docker version 19.03.2, build 6a30dfc docker-compose version 1.24.0, build 0aa59064

setup_1  | setup_elasticsearch    | Move logstash certs to logstash config dir...
setup_1  | setup_elasticsearch    | Move kibana certs to kibana config dir...
setup_1  | setup_elasticsearch    | Move elasticsearch certs to elasticsearch config dir...
setup_1  | setup_elasticsearch exited with code 0
setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
setup_1  | Removing setup_logstash
setup_1  | Removing setup_kibana
Starting elasticsearch ... done
Recreating d72e7edb4410_setup_logstash ... error
setup_1  | Recreating a16d2cbf8de7_setup_kibana   ...
setup_1  |
Recreating a16d2cbf8de7_setup_kibana   ... error
setup_1  |
setup_1  | ERROR: for a16d2cbf8de7_setup_kibana  Cannot start service setup_kibana: OCI runtime create failed: container_linux.go:345: starting container process caused "chdir to cwd (\"/config\") set in config.json failed: permission denied": unknown
setup_1  |
setup_1  | ERROR: for setup_logstash  Cannot start service setup_logstash: OCI runtime create failed: container_linux.go:345: starting container process caused "chdir to cwd (\"/config\") set in config.json failed: permission denied": unknown
setup_1  |
setup_1  | ERROR: for setup_kibana  Cannot start service setup_kibana: OCI runtime create failed: container_linux.go:345: starting container process caused "chdir to cwd (\"/config\") set in config.json failed: permission denied": unknown
setup_1  | Encountered errors while bringing up the project.
setup_1  | Found orphan containers (stack-docker_setup_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
setup_1  | elasticsearch is up-to-date
Creating kibana ... error
setup_1  |
setup_1  | ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/eric/dev/Projects/thirdparty/elastic/stack-docker/config/kibana/kibana.keystore
setup_1  |
setup_1  | ERROR: for kibana  Cannot create container for service kibana: invalid mount config for type "bind": bind source path does not exist: /home/eric/dev/Projects/thirdparty/elastic/stack-docker/config/kibana/kibana.keystore

Any suggestions where to start looking?

benze commented 4 years ago

Turns out permissions on the source folders from the checkout did have the necessary write permissions (it was on a mapped Windows drive)