Docker Compose raise an AccessDeniedExpcetion

I’m trying to compose the ELK architecture by using docker compose. The following is the compose file:

version: '2'

services:

  elasticsearch_assets:
    image: elasticsearch
    volumes:
      - ./elasticsearch/config:/usr/share/elasticsearch/config
      - ./elasticsearch/data:/usr/share/elasticsearch/data
      - ./elasticsearch/logs:/usr/share/elasticsearch/logs
    command: /bin/true

  elasticsearch:
    image: elasticsearch
    volumes_from:
      - elasticsearch_assets:rw
    depends_on:
      - elasticsearch_assets

And here folliwing a screenshot of the project structure:

  • docker-compose up via Windows bat file?
  • Jenkins: Don't want to trigger on Git Tag (No Workspace)
  • Persist data only for selected volumes with docker-compose
  • Linked docker containers can't communicate with each other
  • Equivalent of local host files for running Bluemix containers
  • PHPStorm debug application deployed using docker inside vagrant
  • enter image description here

    When I run docker-compose up I get the following error:

    Starting elkdocker_elasticsearch_assets_1
    Starting elkdocker_elasticsearch_1
    Attaching to elkdocker_elasticsearch_assets_1, elkdocker_elasticsearch_1
    elkdocker_elasticsearch_assets_1 exited with code 0
    elasticsearch_1        | [2016-03-22 01:28:59,939][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: your kernel is buggy and you should upgrade
    elasticsearch_1        | Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.scripts' (/usr/share/elasticsearch/config/scripts)
    elasticsearch_1        | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/scripts
    elasticsearch_1        |    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
    elasticsearch_1        |    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    elasticsearch_1        |    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    elasticsearch_1        |    at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
    elasticsearch_1        |    at java.nio.file.Files.createDirectory(Files.java:674)
    elasticsearch_1        |    at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
    elasticsearch_1        |    at java.nio.file.Files.createDirectories(Files.java:767)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:337)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:248)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Security.configure(Security.java:118)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:196)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
    elasticsearch_1        |    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
    elasticsearch_1        | Refer to the log for complete error details.
    elkdocker_elasticsearch_1 exited with code 1
    

    Do you have any idea why?

  • Cannot create mongodb image on Docker
  • Matched between Docker container and Linux host?
  • Linkerd, k8s and routing
  • Docker-compose network link
  • Kubernetes Volume mountpath
  • How do I uninstall docker-compose?
  • One Solution collect form web for “Docker Compose raise an AccessDeniedExpcetion”

    regarding this error
    Unable to access ‘path.scripts’ error
    just create a sub folder called scripts under the config folder
    it will fix the error

    ./elasticsearch/config ==> mkdir ./elasticsearch/config/scripts

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.