dokku / dokku-elasticsearch

an elasticsearch plugin for dokku
MIT License
94 stars 35 forks source link

Elasticsearch 8.7.1 (or 8.7.0) fails to install (unable to create temporary keystore) #149

Open rikvanderkemp opened 1 year ago

rikvanderkemp commented 1 year ago

If you're using Dokku - especially for commercial purposes - consider donating to project development via OpenCollective or Patreon. Funds go to general development, support, and infrastructure costs.

If you'd like to sponsor specific functionality, see the project's Sponsoring document.

If you need support for a version of Dokku that is more than a year old, your issue may be closed without an answer. Please upgrade to a recent version before filing an issue.

Description of problem

When I try to install the latest ElasticSearch the container will never get up. It seems there is an issue with permissions.

How reproducible

dokku elasticsearch:create my-es -i "elasticsearch" -I 8.7.1

Steps to Reproduce

  1. Run the create command

Actual Results

Creation command output

Error response from daemon: Container 0df01900de7a107b9c6a9928ef9ee38571418ea5304e6a4f3fdbcbd72cc08d51 is restarting, wait until the container is running

Docker log

ERROR: unable to create temporary keystore at [/usr/share/elasticsearch/config/elasticsearch.keystore.tmp], write permissions required for [/usr/share/elasticsearch/config] or run [elasticsearch-keystore upgrade]
Could not create auto-configuration directory

Expected Results

A running ElasticSearch container

Environment Information

dokku report APP_NAME output

Happens for all applications, so docker report is used.

-----> uname: Linux oek 5.15.0-72-generic #79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-----> memory: 
                      total        used        free      shared  buff/cache   available
       Mem:            3827         826         231          28        2770        2677
       Swap:              0           0           0
-----> docker version: 
       Client: Docker Engine - Community
        Version:           24.0.1
        API version:       1.43
        Go version:        go1.20.4
        Git commit:        6802122
        Built:             Fri May 19 18:06:21 2023
        OS/Arch:           linux/amd64
        Context:           default

       Server: Docker Engine - Community
        Engine:
         Version:          24.0.1
         API version:      1.43 (minimum version 1.12)
         Go version:       go1.20.4
         Git commit:       463850e
         Built:            Fri May 19 18:06:21 2023
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.6.21
         GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
        runc:
         Version:          1.1.7
         GitCommit:        v1.1.7-0-g860f061
        docker-init:
         Version:          0.19.0
         GitCommit:        de40ad0
-----> docker daemon info: 
       Client: Docker Engine - Community
        Version:    24.0.1
        Context:    default
        Debug Mode: true
        Plugins:
         buildx: Docker Buildx (Docker Inc.)
           Version:  v0.10.4
           Path:     /usr/libexec/docker/cli-plugins/docker-buildx
         compose: Docker Compose (Docker Inc.)
           Version:  v2.18.1
           Path:     /usr/libexec/docker/cli-plugins/docker-compose
         scan: Docker Scan (Docker Inc.)
           Version:  v0.23.0
           Path:     /usr/libexec/docker/cli-plugins/docker-scan

       Server:
        Containers: 10
         Running: 9
         Paused: 0
         Stopped: 1
        Images: 22
        Server Version: 24.0.1
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Using metacopy: false
         Native Overlay Diff: true
         userxattr: false
        Logging Driver: json-file
        Cgroup Driver: systemd
        Cgroup Version: 2
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
        Swarm: inactive
        Runtimes: io.containerd.runc.v2 runc
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
        runc version: v1.1.7-0-g860f061
        init version: de40ad0
        Security Options:
         apparmor
         seccomp
          Profile: builtin
         cgroupns
        Kernel Version: 5.15.0-72-generic
        Operating System: Ubuntu 22.04.2 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 3
        Total Memory: 3.738GiB
        Name: oek
        ID: dbaf8e64-c393-426d-ad38-6bdd3dfc8047
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false

-----> git version: git version 2.34.1
-----> sigil version: 0.9.0build+bc921b7
-----> herokuish version: 
       herokuish: v0.5.41
       buildpacks:
         heroku-buildpack-multi     v1.2.0
         heroku-buildpack-ruby      v252
         heroku-buildpack-nodejs    v203
         heroku-buildpack-clojure   v90
         heroku-buildpack-python    v226
         heroku-buildpack-java      v72
         heroku-buildpack-gradle    v39
         heroku-buildpack-scala     v96
         heroku-buildpack-play      v26
         heroku-buildpack-php       v231
         heroku-buildpack-go        v171
         heroku-buildpack-nginx     v22
         buildpack-null             v3
-----> dokku version: dokku version 0.30.4
-----> plugn version: plugn: 0.12.0build+3a27594
-----> dokku plugins: 
         00_dokku-standard    0.30.4 enabled    dokku core standard plugin
         20_events            0.30.4 enabled    dokku core events logging plugin
         app-json             0.30.4 enabled    dokku core app-json plugin
         apps                 0.30.4 enabled    dokku core apps plugin
         builder              0.30.4 enabled    dokku core builder plugin
         builder-dockerfile   0.30.4 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.30.4 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.30.4 enabled    dokku core builder-lambda plugin
         builder-null         0.30.4 enabled    dokku core builder-null plugin
         builder-pack         0.30.4 enabled    dokku core builder-pack plugin
         buildpacks           0.30.4 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.30.4 enabled    dokku core caddy-vhosts plugin
         certs                0.30.4 enabled    dokku core certificate management plugin
         checks               0.30.4 enabled    dokku core checks plugin
         common               0.30.4 enabled    dokku core common plugin
         config               0.30.4 enabled    dokku core config plugin
         cron                 0.30.4 enabled    dokku core cron plugin
         docker-options       0.30.4 enabled    dokku core docker-options plugin
         domains              0.30.4 enabled    dokku core domains plugin
         elasticsearch        1.32.1 enabled    dokku elasticsearch service plugin
         enter                0.30.4 enabled    dokku core enter plugin
         git                  0.30.4 enabled    dokku core git plugin
         haproxy-vhosts       0.30.4 enabled    dokku core haproxy-vhosts plugin
         letsencrypt          0.20.0 enabled    Automated installation of let's encrypt TLS certificates
         logs                 0.30.4 enabled    dokku core logs plugin
         mariadb              1.30.1 enabled    dokku mariadb service plugin
         network              0.30.4 enabled    dokku core network plugin
         nginx-vhosts         0.30.4 enabled    dokku core nginx-vhosts plugin
         plugin               0.30.4 enabled    dokku core plugin plugin
         postgres             1.33.0 enabled    dokku postgres service plugin
         proxy                0.30.4 enabled    dokku core proxy plugin
         ps                   0.30.4 enabled    dokku core ps plugin
         redis                1.32.4 enabled    dokku redis service plugin
         registry             0.30.4 enabled    dokku core registry plugin
         repo                 0.30.4 enabled    dokku core repo plugin
         resource             0.30.4 enabled    dokku core resource plugin
         run                  0.30.4 enabled    dokku core run plugin
         scheduler            0.30.4 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.30.4 enabled    dokku core scheduler-docker-local plugin
         scheduler-null       0.30.4 enabled    dokku core scheduler-null plugin
         shell                0.30.4 enabled    dokku core shell plugin
         ssh-keys             0.30.4 enabled    dokku core ssh-keys plugin
         storage              0.30.4 enabled    dokku core storage plugin
         trace                0.30.4 enabled    dokku core trace plugin
         traefik-vhosts       0.30.4 enabled    dokku core traefik-vhosts plugin

How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

I installed dokku on a VPS.

Additional information

+ export DOKKU_HOST_ROOT=/home/dokku
+ DOKKU_HOST_ROOT=/home/dokku
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOCKER_BIN=docker
+ DOCKER_BIN=docker
+ export DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ export DOKKU_CNB_BUILDER=heroku/buildpacks
+ DOKKU_CNB_BUILDER=heroku/buildpacks
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_SYSTEM_GROUP=dokku
+ DOKKU_SYSTEM_GROUP=dokku
+ export DOKKU_SYSTEM_USER=dokku
+ DOKKU_SYSTEM_USER=dokku
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_PID=676867
+ DOKKU_PID=676867
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export 'DOKKU_GLOBAL_BUILD_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_BUILD_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ export 'DOKKU_GLOBAL_RUN_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_RUN_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('elasticsearch:create' 'my-es' '-i' 'elasticsearch' '-I' '8.7.1')
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ elasticsearch:create == \-\-\a\p\p ]]
+ [[ elasticsearch:create =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ my-es == \-\-\a\p\p ]]
+ [[ my-es =~ ^--.* ]]
+ next_index=3
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ -i == \-\-\a\p\p ]]
+ [[ -i =~ ^--.* ]]
+ next_index=4
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ elasticsearch == \-\-\a\p\p ]]
+ [[ elasticsearch =~ ^--.* ]]
+ next_index=5
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ -I == \-\-\a\p\p ]]
+ [[ -I =~ ^--.* ]]
+ next_index=6
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ 8.7.1 == \-\-\a\p\p ]]
+ [[ 8.7.1 =~ ^--.* ]]
+ next_index=7
+ [[ -z '' ]]
++ echo -e ''
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ elasticsearch:create =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ rik != \d\o\k\k\u ]]
+ unset TMP TMPDIR TEMP TEMPDIR
+ [[ ! elasticsearch:create =~ plugin:* ]]
+ [[ elasticsearch:create != \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ elasticsearch:create != \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
++ id -un
+ export SSH_USER=***
+ SSH_USER=***
+ sudo -u dokku -E -H /usr/bin/dokku elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ export DOKKU_HOST_ROOT=/home/dokku
+ DOKKU_HOST_ROOT=/home/dokku
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOCKER_BIN=docker
+ DOCKER_BIN=docker
+ export DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ export DOKKU_CNB_BUILDER=heroku/buildpacks
+ DOKKU_CNB_BUILDER=heroku/buildpacks
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_SYSTEM_GROUP=dokku
+ DOKKU_SYSTEM_GROUP=dokku
+ export DOKKU_SYSTEM_USER=dokku
+ DOKKU_SYSTEM_USER=dokku
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_PID=676878
+ DOKKU_PID=676878
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export 'DOKKU_GLOBAL_BUILD_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_BUILD_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ export 'DOKKU_GLOBAL_RUN_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_RUN_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('elasticsearch:create' 'my-es' '-i' 'elasticsearch' '-I' '8.7.1')
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ elasticsearch:create == \-\-\a\p\p ]]
+ [[ elasticsearch:create =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ my-es == \-\-\a\p\p ]]
+ [[ my-es =~ ^--.* ]]
+ next_index=3
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ -i == \-\-\a\p\p ]]
+ [[ -i =~ ^--.* ]]
+ next_index=4
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ elasticsearch == \-\-\a\p\p ]]
+ [[ elasticsearch =~ ^--.* ]]
+ next_index=5
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ -I == \-\-\a\p\p ]]
+ [[ -I =~ ^--.* ]]
+ next_index=6
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ 8.7.1 == \-\-\a\p\p ]]
+ [[ 8.7.1 =~ ^--.* ]]
+ next_index=7
+ [[ -z '' ]]
++ echo -e ''
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ elasticsearch:create =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/3 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ elasticsearch:create =~ ^plugin:.* ]]
+ [[ elasticsearch:create == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ elasticsearch:create == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ -n '' ]]
+ dokku_auth elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=***
+ SSH_USER=***
+ export SSH_NAME=default
+ SSH_NAME=default
+ export DOKKU_COMMAND=elasticsearch:create
+ DOKKU_COMMAND=elasticsearch:create
++ wc -l
++ find /var/lib/dokku/plugins/enabled/20_events/user-auth
+ local user_auth_count=1
+ [[ 1 == 0 ]]
+ [[ 1 == 1 ]]
+ [[ -f /var/lib/dokku/plugins/enabled/20_events/user-auth ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=elasticsearch:create
+ local PLUGIN_CMD=elasticsearch:create
+ local implemented=0
+ local script
+ argv=('elasticsearch:create' 'my-es' '-i' 'elasticsearch' '-I' '8.7.1')
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/elasticsearch
+ [[ /var/lib/dokku/plugins/available/elasticsearch == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/elasticsearch:create/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/elasticsearch:create/subcommands/elasticsearch:create ]]
+ [[ -x /var/lib/dokku/plugins/enabled/elasticsearch/subcommands/create ]]
+ [[ -n create ]]
+ /var/lib/dokku/plugins/enabled/elasticsearch/subcommands/create elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/subcommands/create
+++ cd /var/lib/dokku/plugins/enabled/elasticsearch/subcommands
+++ pwd
++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/subcommands
+ source /var/lib/dokku/plugins/enabled/elasticsearch/functions
++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/functions
+++ cd /var/lib/dokku/plugins/enabled/elasticsearch
+++ pwd
++ source /var/lib/dokku/plugins/enabled/elasticsearch/config
+++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/config
++++ cd /var/lib/dokku/plugins/enabled/elasticsearch
++++ pwd
+++ _DIR=/var/lib/dokku/plugins/enabled/elasticsearch
+++ export ELASTICSEARCH_IMAGE=elasticsearch
+++ ELASTICSEARCH_IMAGE=elasticsearch
+++ export ELASTICSEARCH_IMAGE_VERSION=8.7.1
+++ ELASTICSEARCH_IMAGE_VERSION=8.7.1
+++ export ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch
+++ ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch
+++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ export ELASTICSEARCH_HOST_ROOT=/var/lib/dokku/services/elasticsearch
+++ ELASTICSEARCH_HOST_ROOT=/var/lib/dokku/services/elasticsearch
+++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=('backup' 'backup-auth' 'backup-deauth' 'backup-schedule' 'backup-schedule-cat' 'backup-set-encryption' 'backup-unschedule' 'backup-unset-encryption' 'clone' 'connect' 'export' 'import')
+++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
+++ export PLUGIN_COMMAND_PREFIX=elasticsearch
+++ PLUGIN_COMMAND_PREFIX=elasticsearch
+++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/elasticsearch
+++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/elasticsearch
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/elasticsearch
+++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/elasticsearch
+++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/elasticsearch
+++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/elasticsearch
+++ PLUGIN_DATASTORE_PORTS=('9200' '9300')
+++ export PLUGIN_DATASTORE_PORTS
+++ export PLUGIN_DATASTORE_WAIT_PORT=9200
+++ PLUGIN_DATASTORE_WAIT_PORT=9200
+++ export PLUGIN_DEFAULT_ALIAS=ELASTICSEARCH
+++ PLUGIN_DEFAULT_ALIAS=ELASTICSEARCH
+++ export PLUGIN_DISABLE_PULL=
+++ PLUGIN_DISABLE_PULL=
+++ export PLUGIN_DISABLE_PULL_VARIABLE=ELASTICSEARCH_DISABLE_PULL
+++ PLUGIN_DISABLE_PULL_VARIABLE=ELASTICSEARCH_DISABLE_PULL
+++ export PLUGIN_ALT_ALIAS=DOKKU_ELASTICSEARCH
+++ PLUGIN_ALT_ALIAS=DOKKU_ELASTICSEARCH
+++ export PLUGIN_IMAGE=elasticsearch
+++ PLUGIN_IMAGE=elasticsearch
+++ export PLUGIN_IMAGE_VERSION=8.7.1
+++ PLUGIN_IMAGE_VERSION=8.7.1
+++ export PLUGIN_SCHEME=http
+++ PLUGIN_SCHEME=http
+++ export PLUGIN_SERVICE=Elasticsearch
+++ PLUGIN_SERVICE=Elasticsearch
+++ export PLUGIN_VARIABLE=ELASTICSEARCH
+++ PLUGIN_VARIABLE=ELASTICSEARCH
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ export PLUGIN_CONFIG_SUFFIX=config
+++ PLUGIN_CONFIG_SUFFIX=config
+++ [[ -n 1 ]]
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
+++ export PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
+++ PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
+++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
+++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
+++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
+++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
+++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
+++ PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
+++ export ELASTICSEARCH_CONFIG_OPTIONS=
+++ ELASTICSEARCH_CONFIG_OPTIONS=
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/functions
+++ cd /var/lib/dokku/plugins/enabled/elasticsearch
+++ pwd
++ source /var/lib/dokku/plugins/enabled/elasticsearch/common-functions
+++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/common-functions
++++ cd /var/lib/dokku/plugins/enabled/elasticsearch
++++ pwd
+++ source /var/lib/dokku/plugins/enabled/elasticsearch/config
++++++ dirname /var/lib/dokku/plugins/enabled/elasticsearch/config
+++++ cd /var/lib/dokku/plugins/enabled/elasticsearch
+++++ pwd
++++ _DIR=/var/lib/dokku/plugins/enabled/elasticsearch
++++ export ELASTICSEARCH_IMAGE=elasticsearch
++++ ELASTICSEARCH_IMAGE=elasticsearch
++++ export ELASTICSEARCH_IMAGE_VERSION=8.7.1
++++ ELASTICSEARCH_IMAGE_VERSION=8.7.1
++++ export ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch
++++ ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch
++++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ export ELASTICSEARCH_HOST_ROOT=/var/lib/dokku/services/elasticsearch
++++ ELASTICSEARCH_HOST_ROOT=/var/lib/dokku/services/elasticsearch
++++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=('backup' 'backup-auth' 'backup-deauth' 'backup-schedule' 'backup-schedule-cat' 'backup-set-encryption' 'backup-unschedule' 'backup-unset-encryption' 'clone' 'connect' 'export' 'import')
++++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
++++ export PLUGIN_COMMAND_PREFIX=elasticsearch
++++ PLUGIN_COMMAND_PREFIX=elasticsearch
++++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/elasticsearch
++++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/elasticsearch
++++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/elasticsearch
++++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/elasticsearch
++++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/elasticsearch
++++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/elasticsearch
++++ PLUGIN_DATASTORE_PORTS=('9200' '9300')
++++ export PLUGIN_DATASTORE_PORTS
++++ export PLUGIN_DATASTORE_WAIT_PORT=9200
++++ PLUGIN_DATASTORE_WAIT_PORT=9200
++++ export PLUGIN_DEFAULT_ALIAS=ELASTICSEARCH
++++ PLUGIN_DEFAULT_ALIAS=ELASTICSEARCH
++++ export PLUGIN_DISABLE_PULL=
++++ PLUGIN_DISABLE_PULL=
++++ export PLUGIN_DISABLE_PULL_VARIABLE=ELASTICSEARCH_DISABLE_PULL
++++ PLUGIN_DISABLE_PULL_VARIABLE=ELASTICSEARCH_DISABLE_PULL
++++ export PLUGIN_ALT_ALIAS=DOKKU_ELASTICSEARCH
++++ PLUGIN_ALT_ALIAS=DOKKU_ELASTICSEARCH
++++ export PLUGIN_IMAGE=elasticsearch
++++ PLUGIN_IMAGE=elasticsearch
++++ export PLUGIN_IMAGE_VERSION=8.7.1
++++ PLUGIN_IMAGE_VERSION=8.7.1
++++ export PLUGIN_SCHEME=http
++++ PLUGIN_SCHEME=http
++++ export PLUGIN_SERVICE=Elasticsearch
++++ PLUGIN_SERVICE=Elasticsearch
++++ export PLUGIN_VARIABLE=ELASTICSEARCH
++++ PLUGIN_VARIABLE=ELASTICSEARCH
++++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ export PLUGIN_CONFIG_SUFFIX=config
++++ PLUGIN_CONFIG_SUFFIX=config
++++ [[ -n 1 ]]
++++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
++++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
++++ export PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
++++ PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
++++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
++++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
++++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
++++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
++++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
++++ PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
++++ export ELASTICSEARCH_CONFIG_OPTIONS=
++++ ELASTICSEARCH_CONFIG_OPTIONS=
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/property-functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ source /var/lib/dokku/plugins/available/config/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/core-plugins/available/common/property-functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ [[ -f /var/lib/dokku/plugins/available/docker-options/functions ]]
++ source /var/lib/dokku/plugins/available/docker-options/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ AVAILABLE_PHASES=(build deploy run)
+ service-create-cmd elasticsearch:create my-es -i elasticsearch -I 8.7.1
+ declare 'desc=create a Elasticsearch service'
+ argv=('elasticsearch:create' 'my-es' '-i' 'elasticsearch' '-I' '8.7.1')
+ local cmd=elasticsearch:create argv
+ [[ elasticsearch:create == \e\l\a\s\t\i\c\s\e\a\r\c\h\:\c\r\e\a\t\e ]]
+ shift 1
+ CREATE_FLAGS_LIST=('-i' 'elasticsearch' '-I' '8.7.1')
+ declare SERVICE=my-es CREATE_FLAGS_LIST
+ service_create my-es -i elasticsearch -I 8.7.1
+ local SERVICE=my-es
+ is_valid_service_name my-es
+ declare 'desc=validate a service name'
+ declare SERVICE=my-es
+ [[ -z my-es ]]
+ [[ my-es =~ ^[A-Za-z0-9_-]+$ ]]
+ return 0
+ [[ -z my-es ]]
+ [[ ! -d /var/lib/dokku/services/elasticsearch/my-es ]]
+ SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/my-es
+ LINKS_FILE=/var/lib/dokku/services/elasticsearch/my-es/LINKS
+ service_parse_args -i elasticsearch -I 8.7.1
+ declare 'desc=cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('-i' 'elasticsearch' '-I' '8.7.1')
+ local args
+ for arg in "$@"
+ shift
+ case "$arg" in
+ set -- elasticsearch -I 8.7.1 -i
+ for arg in "$@"
+ shift
+ case "$arg" in
+ set -- -I 8.7.1 -i elasticsearch
+ for arg in "$@"
+ shift
+ case "$arg" in
+ set -- 8.7.1 -i elasticsearch -I
+ for arg in "$@"
+ shift
+ case "$arg" in
+ set -- -i elasticsearch -I 8.7.1
+ OPTIND=1
+ getopts na:c:C:d:i:I:m:n:N:p:P:q:R:r:s:S:u: opt
+ case "$opt" in
+ export PLUGIN_IMAGE=elasticsearch
+ PLUGIN_IMAGE=elasticsearch
+ getopts na:c:C:d:i:I:m:n:N:p:P:q:R:r:s:S:u: opt
+ case "$opt" in
+ export PLUGIN_IMAGE_VERSION=8.7.1
+ PLUGIN_IMAGE_VERSION=8.7.1
+ getopts na:c:C:d:i:I:m:n:N:p:P:q:R:r:s:S:u: opt
+ shift 4
+ service_check_sysctl
++ sysctl -n vm.max_map_count
+ local VM_MAX_MAP_COUNT_CURRENT=262144
+ local VM_MAX_MAP_COUNT_REQUIRED=262144
+ '[' 262144 -lt 262144 ']'
+ service_image_exists my-es
+ declare 'desc=check if the current image exists'
+ declare SERVICE=my-es PLUGIN_IMAGE=elasticsearch PLUGIN_IMAGE_VERSION=8.7.1
+ local plugin_image=elasticsearch
+ local plugin_image_version=8.7.1
+ [[ -z elasticsearch ]]
+ [[ -z 8.7.1 ]]
+ local IMAGE=elasticsearch:8.7.1
++ docker image ls -q elasticsearch:8.7.1
+ [[ 59075530be34 == '' ]]
+ return 0
+ plugn trigger service-action pre-create elasticsearch my-es
+ mkdir -p /var/lib/dokku/services/elasticsearch/my-es
+ mkdir -p /var/lib/dokku/services/elasticsearch/my-es/data
+ mkdir -p /var/lib/dokku/services/elasticsearch/my-es/config
+ touch /var/lib/dokku/services/elasticsearch/my-es/LINKS
+ dokku_log_info2 'Extracting config files'
+ declare 'desc=log info2 formatter'
+ echo '=====> Extracting config files'
=====> Extracting config files
++ docker container create elasticsearch:8.7.1
+ TEMP_DOCKER_CONTAINER_ID=260242b0cb25616eb1fda869edc201d9ecd8da07188c1cdc969338cf84de06a1
+ docker container cp 260242b0cb25616eb1fda869edc201d9ecd8da07188c1cdc969338cf84de06a1:/usr/share/elasticsearch/config/ /var/lib/dokku/services/elasticsearch/my-es/
Successfully copied 43.5kB to /var/lib/dokku/services/elasticsearch/my-es/
+ docker container rm -v 260242b0cb25616eb1fda869edc201d9ecd8da07188c1cdc969338cf84de06a1
+ sed -i.bak 's#Xms1g#Xms512m#g; s#Xmx1g#Xmx512m#g' /var/lib/dokku/services/elasticsearch/my-es/config/jvm.options
++ echo 8.7.1
++ cut -d . -f 1
+ local ELASTICSEARCH_MAJOR_VERSION=8
+ [[ 8 -ge 7 ]]
+ grep -q initial_master_nodes /var/lib/dokku/services/elasticsearch/my-es/config/elasticsearch.yml
+ sigil -f /var/lib/dokku/plugins/enabled/elasticsearch/templates/8-config.yml.sigil SERVICE_NAME=
+ service_commit_config my-es
+ declare SERVICE=my-es
+ local SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/my-es
+ local CONFIG_VARIABLE=ELASTICSEARCH_CONFIG_OPTIONS
+ local ENV_VARIABLE=ELASTICSEARCH_CUSTOM_ENV
+ custom_env=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ echo ''
+ config_options=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ echo ''
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n elasticsearch ]]
+ echo elasticsearch
+ [[ -n 8.7.1 ]]
+ echo 8.7.1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ write_database_name my-es
+ declare 'desc=write a sanitized database name'
+ declare SERVICE=my-es
+ local SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/my-es
+ echo my-es
+ tr .- _
+ plugn trigger service-action post-create elasticsearch my-es
+ service_create_container my-es
+ local SERVICE=my-es
+ local SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/my-es
+ local SERVICE_HOST_ROOT=/var/lib/dokku/services/elasticsearch/my-es
++ get_service_name my-es
++ declare 'desc=retrieve a docker service label'
++ declare SERVICE=my-es
++ echo dokku.elasticsearch.my-es
+ local SERVICE_NAME=dokku.elasticsearch.my-es
++ echo 8.7.1
++ cut -d . -f 1
+ local ELASTICSEARCH_MAJOR_VERSION=8
+ [[ -f /var/lib/dokku/services/elasticsearch/my-es/CONFIG_OPTIONS ]]
++ cat /var/lib/dokku/services/elasticsearch/my-es/CONFIG_OPTIONS
+ export CONFIG_OPTIONS=
+ CONFIG_OPTIONS=
++ service_dns_hostname my-es
++ declare 'desc=retrieve the alias of a service'
++ declare SERVICE=my-es
+++ get_service_name my-es
+++ declare 'desc=retrieve a docker service label'
+++ declare SERVICE=my-es
+++ echo dokku.elasticsearch.my-es
++ local SERVICE_NAME=dokku.elasticsearch.my-es
++ echo dokku.elasticsearch.my-es
++ tr ._ -
+ local network_alias=dokku-elasticsearch-my-es
+ rm -f /var/lib/dokku/services/elasticsearch/my-es/ID
+ declare -a DOCKER_ARGS
+ DOCKER_ARGS=()
+ DOCKER_ARGS+=("--cidfile=$SERVICE_ROOT/ID")
+ DOCKER_ARGS+=("--env-file=$SERVICE_ROOT/ENV")
+ DOCKER_ARGS+=("--hostname=$SERVICE_NAME")
+ DOCKER_ARGS+=("--label=dokku.service=$PLUGIN_COMMAND_PREFIX")
+ DOCKER_ARGS+=("--label=dokku=service")
+ DOCKER_ARGS+=("--name=$SERVICE_NAME")
+ DOCKER_ARGS+=("--restart=always")
+ DOCKER_ARGS+=("--volume=$SERVICE_HOST_ROOT/$PLUGIN_CONFIG_SUFFIX:/usr/share/elasticsearch/config")
+ DOCKER_ARGS+=("--volume=$SERVICE_HOST_ROOT/data:/usr/share/elasticsearch/data")
+ declare -a LINK_CONTAINER_DOCKER_ARGS
+ LINK_CONTAINER_DOCKER_ARGS=()
+ LINK_CONTAINER_DOCKER_ARGS+=("--rm")
+ LINK_CONTAINER_DOCKER_ARGS+=("--link")
+ LINK_CONTAINER_DOCKER_ARGS+=("$SERVICE_NAME:$network_alias")
+ [[ -f /var/lib/dokku/services/elasticsearch/my-es/SERVICE_MEMORY ]]
+ [[ -n '' ]]
+ [[ -f /var/lib/dokku/services/elasticsearch/my-es/SHM_SIZE ]]
+ [[ -n '' ]]
+ [[ -f /var/lib/dokku/services/elasticsearch/my-es/IMAGE ]]
++ cat /var/lib/dokku/services/elasticsearch/my-es/IMAGE
+ PLUGIN_IMAGE=elasticsearch
+ [[ -f /var/lib/dokku/services/elasticsearch/my-es/IMAGE_VERSION ]]
++ cat /var/lib/dokku/services/elasticsearch/my-es/IMAGE_VERSION
+ PLUGIN_IMAGE_VERSION=8.7.1
++ fn-plugin-property-get elasticsearch my-es initial-network
++ declare 'desc=returns the value for a given property'
++ declare PLUGIN=elasticsearch APP=my-es KEY=initial-network DEFAULT=
++ fn-plugin-property-get-default elasticsearch my-es initial-network ''
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=elasticsearch APP=my-es KEY=initial-network DEFAULT=
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default elasticsearch my-es initial-network ''
+ local network=
+ [[ -n '' ]]
+ suppress_output docker container create --cidfile=/var/lib/dokku/services/elasticsearch/my-es/ID --env-file=/var/lib/dokku/services/elasticsearch/my-es/ENV --hostname=dokku.elasticsearch.my-es --label=dokku.service=elasticsearch --label=dokku=service --name=dokku.elasticsearch.my-es --restart=always --volume=/var/lib/dokku/services/elasticsearch/my-es/config:/usr/share/elasticsearch/config --volume=/var/lib/dokku/services/elasticsearch/my-es/data:/usr/share/elasticsearch/data elasticsearch:8.7.1
+ declare 'desc=suppress all output from a given command unless there is an error'
+ local TMP_COMMAND_OUTPUT
++ mktemp /tmp/dokku-676878-suppress_output.XXXXXX
+ TMP_COMMAND_OUTPUT=/tmp/dokku-676878-suppress_output.HfMzLe
+ trap 'rm -rf '\''/tmp/dokku-676878-suppress_output.HfMzLe'\'' >/dev/null' RETURN
+ docker container create --cidfile=/var/lib/dokku/services/elasticsearch/my-es/ID --env-file=/var/lib/dokku/services/elasticsearch/my-es/ENV --hostname=dokku.elasticsearch.my-es --label=dokku.service=elasticsearch --label=dokku=service --name=dokku.elasticsearch.my-es --restart=always --volume=/var/lib/dokku/services/elasticsearch/my-es/config:/usr/share/elasticsearch/config --volume=/var/lib/dokku/services/elasticsearch/my-es/data:/usr/share/elasticsearch/data elasticsearch:8.7.1
+ return 0
++ rm -rf /tmp/dokku-676878-suppress_output.HfMzLe
++ fn-plugin-property-get elasticsearch my-es post-create-network
++ declare 'desc=returns the value for a given property'
++ declare PLUGIN=elasticsearch APP=my-es KEY=post-create-network DEFAULT=
++ fn-plugin-property-get-default elasticsearch my-es post-create-network ''
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=elasticsearch APP=my-es KEY=post-create-network DEFAULT=
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default elasticsearch my-es post-create-network ''
+ [[ -n '' ]]
++ cat /var/lib/dokku/services/elasticsearch/my-es/ID
+ suppress_output docker container start d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137
+ declare 'desc=suppress all output from a given command unless there is an error'
+ local TMP_COMMAND_OUTPUT
++ mktemp /tmp/dokku-676878-suppress_output.XXXXXX
+ TMP_COMMAND_OUTPUT=/tmp/dokku-676878-suppress_output.ltbMYB
+ trap 'rm -rf '\''/tmp/dokku-676878-suppress_output.ltbMYB'\'' >/dev/null' RETURN
+ docker container start d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137
+ return 0
++ rm -rf /tmp/dokku-676878-suppress_output.ltbMYB
+ service_port_reconcile_status my-es
+ declare SERVICE=my-es
+ local SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/my-es
+ local PORT_FILE=/var/lib/dokku/services/elasticsearch/my-es/PORT
++ get_service_name my-es
++ declare 'desc=retrieve a docker service label'
++ declare SERVICE=my-es
++ echo dokku.elasticsearch.my-es
+ local SERVICE_NAME=dokku.elasticsearch.my-es
+ local EXPOSED_NAME=dokku.elasticsearch.my-es.ambassador
+ [[ ! -s /var/lib/dokku/services/elasticsearch/my-es/PORT ]]
+ docker container inspect dokku.elasticsearch.my-es.ambassador
+ return
++ fn-plugin-property-get elasticsearch my-es post-start-network
++ declare 'desc=returns the value for a given property'
++ declare PLUGIN=elasticsearch APP=my-es KEY=post-start-network DEFAULT=
++ fn-plugin-property-get-default elasticsearch my-es post-start-network ''
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=elasticsearch APP=my-es KEY=post-start-network DEFAULT=
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default elasticsearch my-es post-start-network ''
+ [[ -n '' ]]
++ cat /var/lib/dokku/services/elasticsearch/my-es/ID
+ retry-docker-command d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ local ID=d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 'COMMAND=chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ local i=0 success=false
+ '[' 0 -ge 100 ']'
+ set +e
+ suppress_output docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ declare 'desc=suppress all output from a given command unless there is an error'
+ local TMP_COMMAND_OUTPUT
++ mktemp /tmp/dokku-676878-suppress_output.XXXXXX
+ TMP_COMMAND_OUTPUT=/tmp/dokku-676878-suppress_output.XEFOK2
+ trap 'rm -rf '\''/tmp/dokku-676878-suppress_output.XEFOK2'\'' >/dev/null' RETURN
+ docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ local exit_code=1
+ cat /tmp/dokku-676878-suppress_output.XEFOK2
chown: changing ownership of '/usr/share/elasticsearch/config/users_roles': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/elasticsearch.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/elasticsearch-plugins.example.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/log4j2.properties': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/log4j2.file.properties': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/users': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options.d': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options.bak': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/roles.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/role_mapping.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/data': Operation not permitted
+ return 1
++ rm -rf /tmp/dokku-676878-suppress_output.XEFOK2
+ exit_code=1
+ set -e
+ [[ 1 == 0 ]]
+ i=1
+ sleep 1
+ '[' 1 -ge 100 ']'
+ set +e
+ suppress_output docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ declare 'desc=suppress all output from a given command unless there is an error'
+ local TMP_COMMAND_OUTPUT
++ mktemp /tmp/dokku-676878-suppress_output.XXXXXX
+ TMP_COMMAND_OUTPUT=/tmp/dokku-676878-suppress_output.M3jDN0
+ trap 'rm -rf '\''/tmp/dokku-676878-suppress_output.M3jDN0'\'' >/dev/null' RETURN
+ docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ local exit_code=1
+ cat /tmp/dokku-676878-suppress_output.M3jDN0
chown: changing ownership of '/usr/share/elasticsearch/config/users_roles': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/elasticsearch.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/elasticsearch-plugins.example.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/log4j2.properties': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/log4j2.file.properties': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/users': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options.d': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/jvm.options.bak': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/roles.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config/role_mapping.yml': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/config': Operation not permitted
chown: changing ownership of '/usr/share/elasticsearch/data': Operation not permitted
+ return 1
++ rm -rf /tmp/dokku-676878-suppress_output.M3jDN0
+ exit_code=1
+ set -e
+ [[ 1 == 0 ]]
+ i=2
+ sleep 1
+ '[' 2 -ge 100 ']'
+ set +e
+ suppress_output docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ declare 'desc=suppress all output from a given command unless there is an error'
+ local TMP_COMMAND_OUTPUT
++ mktemp /tmp/dokku-676878-suppress_output.XXXXXX
+ TMP_COMMAND_OUTPUT=/tmp/dokku-676878-suppress_output.2L3ERI
+ trap 'rm -rf '\''/tmp/dokku-676878-suppress_output.2L3ERI'\'' >/dev/null' RETURN
+ docker container exec d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 sh -c 'chown -R 1000:0 /usr/share/elasticsearch/config; chown 1000:0 /usr/share/elasticsearch/data'
+ local exit_code=1
+ cat /tmp/dokku-676878-suppress_output.2L3ERI
Error response from daemon: Container d0ed99847f21c1b7397c2f3980aa9a35f4d2bfbf4819e72496c2dced64728137 is restarting, wait until the container is running
+ return 1
++ rm -rf /tmp/dokku-676878-suppress_output.2L3ERI
+ exit_code=1
+ set -e
+ [[ 1 == 0 ]]
+ i=3
+ sleep 1