{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/32","repository_url":"https://api.github.com/repos/elastic/elasticsearch-docker","labels_url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/32/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/32/events","html_url":"https://github.com/elastic/elasticsearch-docker/issues/32","id":211884633,"node_id":"MDU6SXNzdWUyMTE4ODQ2MzM=","number":32,"title":"Failed to created node environment - part 2","user":{"login":"bluepuma77","id":5221187,"node_id":"MDQ6VXNlcjUyMjExODc=","avatar_url":"https://avatars1.githubusercontent.com/u/5221187?v=4","gravatar_id":"","url":"https://api.github.com/users/bluepuma77","html_url":"https://github.com/bluepuma77","followers_url":"https://api.github.com/users/bluepuma77/followers","following_url":"https://api.github.com/users/bluepuma77/following{/other_user}","gists_url":"https://api.github.com/users/bluepuma77/gists{/gist_id}","starred_url":"https://api.github.com/users/bluepuma77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluepuma77/subscriptions","organizations_url":"https://api.github.com/users/bluepuma77/orgs","repos_url":"https://api.github.com/users/bluepuma77/repos","events_url":"https://api.github.com/users/bluepuma77/events{/privacy}","received_events_url":"https://api.github.com/users/bluepuma77/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":52,"created_at":"2017-03-04T15:06:18Z","updated_at":"2018-08-27T03:46:50Z","closed_at":"2017-06-07T04:21:08Z","author_association":"NONE","body":"## Bug description\r\nStarting elasticsearch:5.2.2 results in `Failed to created node environment`. This has been covered in [#21](https://github.com/elastic/elasticsearch-docker/issues/21), the recommendation was to set user permissions on the host system.\r\n\r\n```\r\ndocker run --rm -v /tmp/elastic:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:5.2.2\r\n# breaks\r\n```\r\n\r\nI prefer simple fire & forget docker containers which don't need any preparation on the host system. Would it be an option to check the Elasticsearch image from Docker, that runs fine, without setting any permissions before, and replicate that behaviour in new `elasticsearch-docker`?\r\n\r\n```\r\ndocker run --rm -v /tmp/elastic:/usr/share/elasticsearch/data elasticsearch:5.2.2\r\n# runs\r\n```\r\n\r\n```\r\n# sudo docker run --rm -v /tmp/data:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:5.2.2 \r\n[2017-03-04T14:44:14,972][INFO ][o.e.n.Node               ] [] initializing ...\r\n[2017-03-04T14:44:14,989][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]\r\norg.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Failed to created node environment\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.2.2.jar:5.2.2]\r\nCaused by: java.lang.IllegalStateException: Failed to created node environment\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\t... 6 more\r\nCaused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes\r\n\tat sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:?]\r\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]\r\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]\r\n\tat sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:?]\r\n\tat java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_92-internal]\r\n\tat java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_92-internal]\r\n\tat java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_92-internal]\r\n\tat org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:221) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:252) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.2.jar:5.2.2]\r\n\t... 6 more\r\n```\r\n\r\n\r\n\r\n```\r\n# uname -a\r\nLinux yukka1 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\n```\r\n# docker info\r\nContainers: 20\r\n Running: 16\r\n Paused: 0\r\n Stopped: 4\r\nImages: 62\r\nServer Version: 1.13.1\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 311\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1\r\nrunc version: 9df8b306d01f59d3a8029be411de015b7304dd8f\r\ninit version: 949e6fa\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-59-generic\r\nOperating System: Ubuntu 16.04.2 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 12\r\nTotal Memory: 62.35 GiB\r\nName: yukka1\r\nID: XAGB:VGNL:EAJW:GXJ2:USZP:HOOK:KKQL:J2HB:YNU5:ZMAG:SA3X:RVOG\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nLabels:\r\n provider=generic\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/comments/416106344","html_url":"https://github.com/elastic/elasticsearch-docker/issues/32#issuecomment-416106344","issue_url":"https://api.github.com/repos/elastic/elasticsearch-docker/issues/32","id":416106344,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjEwNjM0NA==","user":{"login":"jazoom","id":8279246,"node_id":"MDQ6VXNlcjgyNzkyNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/8279246?v=4","gravatar_id":"","url":"https://api.github.com/users/jazoom","html_url":"https://github.com/jazoom","followers_url":"https://api.github.com/users/jazoom/followers","following_url":"https://api.github.com/users/jazoom/following{/other_user}","gists_url":"https://api.github.com/users/jazoom/gists{/gist_id}","starred_url":"https://api.github.com/users/jazoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazoom/subscriptions","organizations_url":"https://api.github.com/users/jazoom/orgs","repos_url":"https://api.github.com/users/jazoom/repos","events_url":"https://api.github.com/users/jazoom/events{/privacy}","received_events_url":"https://api.github.com/users/jazoom/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T03:46:50Z","updated_at":"2018-08-27T03:46:50Z","author_association":"NONE","body":"Haha. Dangit. A year later I'm now migrating from Swarm to Kubernetes and ran into the same problem again and found this issue. Here we go again..."}}
{"actor":{"display_login":"jazoom"}}