Installation hangs and Docker authorization issues

Symptoms:

  • The Elastic Cloud Enterprise installation script fails almost immediately with a permission issue:

    mkdir: cannot create directory ‘/mnt/data/elastic’: Permission denied
  • The installation fails quickly with mkdir: cannot create directory ‘/mnt/data/elastic’: Permission denied.
  • The Elastic Cloud Enterprise installation script hangs for 30 minutes or more. Rerunning the script with the --debug option shows that the installation process starts to hang shortly after a monitoring message:

    -- Monitoring /mnt/data/elastic/bootstrap-logs/bootstrap.log
    [2016-07-01 00:40:27,738][INFO ][no.found.bootstrap.BootstrapInitial] Loaded bootstrap settings for initial runner: [RunnerConfiguration(runner-23LF02,54.153.72.103,172.31.20.116,ece-region,ece-regiona,30720,/mnt/data/elastic/runner-23LF02/services/runners/containers,{})]
  • The Docker logs for the container include authorization warnings and Java exceptions:

    [2016-07-13 18:16:21,214][WARN ][no.found.docker.DockerContainerManager] Default registry [https://index.docker.io/v1/] has no auths. Known auths: [List()]
    Exception in thread "main" java.nio.file.AccessDeniedException: /mnt/data/elastic/elastic-cloud1

    On RHEL and CentOS, attempts to enable Docker to start when you boot your system might fail with the error message Failed to execute operation: Invalid argument.

Resolution: These symptoms indicate a file path permission issue. Make sure that the file path /mnt/data/elastic is writable or owned by the user with UID 1000.

Make sure that the file path /mnt/data/elastic is writable or owned by the user with UID 1000.

You can use the following commands to set the required file path permissions (on RHEL and CentOS, only the second command might be required):

sudo chmod -R +r .docker/

sudo chown -R 1000:1000 /mnt/data