Created
September 20, 2016 14:21
-
-
Save IlyaSemenov/543a3c7252c9a5b4cb8e8c8a90475bda to your computer and use it in GitHub Desktop.
dokku elasticsearch:create fails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dokku elasticsearch:create test | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ 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_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_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_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_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args elasticsearch:create test | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ return 0 | |
+ args=("$@") | |
+ [[ elasticsearch:create =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ root != \d\o\k\k\u ]] | |
+ [[ ! elasticsearch:create =~ plugin:* ]] | |
+ [[ ! elasticsearch:create == \s\s\h\-\k\e\y\s\:\a\d\d ]] | |
++ id -un | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ sudo -u dokku -E -H /usr/bin/dokku elasticsearch:create test | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ 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_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_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_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_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args elasticsearch:create test | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ return 0 | |
+ args=("$@") | |
+ [[ elasticsearch:create =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ dokku != \d\o\k\k\u ]] | |
++ id -un | |
+ [[ dokku != \r\o\o\t ]] | |
+ [[ elasticsearch:create =~ ^plugin:.* ]] | |
++ id -un | |
+ [[ dokku != \r\o\o\t ]] | |
+ [[ elasticsearch:create == \s\s\h\-\k\e\y\s\:\a\d\d ]] | |
+ [[ -n '' ]] | |
+ dokku_auth elasticsearch:create test | |
+ declare 'desc=calls user-auth plugin trigger' | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ export SSH_NAME=default | |
+ SSH_NAME=default | |
+ plugn trigger user-auth root default elasticsearch:create test | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ elasticsearch:create =~ (ssh-keys:add|ssh-keys:remove) ]] | |
+ return 0 | |
+ case "$1" in | |
+ execute_dokku_cmd elasticsearch:create test | |
+ declare 'desc=executes dokku sub-commands' | |
+ local PLUGIN_NAME=elasticsearch:create | |
+ local PLUGIN_CMD=elasticsearch:create | |
+ local implemented=0 | |
+ local script | |
+ argv=("$@") | |
+ 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 ]] | |
+ /var/lib/dokku/plugins/enabled/elasticsearch/subcommands/create elasticsearch:create test | |
+ source /var/lib/dokku/plugins/enabled/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 | |
+++ export ELASTICSEARCH_IMAGE=elasticsearch | |
+++ ELASTICSEARCH_IMAGE=elasticsearch | |
+++ export ELASTICSEARCH_IMAGE_VERSION=2.3.5 | |
+++ ELASTICSEARCH_IMAGE_VERSION=2.3.5 | |
+++ export ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch | |
+++ ELASTICSEARCH_ROOT=/var/lib/dokku/services/elasticsearch | |
+++ export PLUGIN_COMMAND_PREFIX=elasticsearch | |
+++ PLUGIN_COMMAND_PREFIX=elasticsearch | |
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/elasticsearch | |
+++ PLUGIN_DATA_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_ALT_ALIAS=DOKKU_ELASTICSEARCH | |
+++ PLUGIN_ALT_ALIAS=DOKKU_ELASTICSEARCH | |
+++ export PLUGIN_IMAGE=elasticsearch | |
+++ PLUGIN_IMAGE=elasticsearch | |
+++ export PLUGIN_IMAGE_VERSION=2.3.5 | |
+++ PLUGIN_IMAGE_VERSION=2.3.5 | |
+++ export PLUGIN_SCHEME=http | |
+++ PLUGIN_SCHEME=http | |
+++ export PLUGIN_SERVICE=Elasticsearch | |
+++ PLUGIN_SERVICE=Elasticsearch | |
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins | |
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins | |
+++ [[ -n 1 ]] | |
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled | |
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled | |
+++ [[ -d /var/lib/dokku/services/elasticsearch/* ]] | |
++ 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 | |
+++ 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) | |
+ elasticsearch-create-cmd elasticsearch:create test | |
+ declare 'desc=create a Elasticsearch service' | |
+ argv=("$@") | |
+ 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 | |
+ declare SERVICE=test | |
+ service_create test | |
+ local SERVICE=test | |
+ [[ -z test ]] | |
+ [[ ! -d /var/lib/dokku/services/elasticsearch/test ]] | |
+ SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/test | |
+ LINKS_FILE=/var/lib/dokku/services/elasticsearch/test/LINKS | |
+ docker images | |
+ grep -e '^elasticsearch ' | |
+ grep -q ' 2.3.5 ' | |
+ docker pull elasticsearch:2.3.5 | |
2.3.5: Pulling from library/elasticsearch | |
8ad8b3f87b37: Pull complete | |
751fe39c4d34: Pull complete | |
b165e84cccc1: Pull complete | |
acfcc7cbc59b: Pull complete | |
04b7a9efc4af: Pull complete | |
b16e55fe5285: Pull complete | |
8c5cbb866b55: Pull complete | |
53c3dd7fc70d: Pull complete | |
3de13756a8c8: Pull complete | |
1e7a8e49a5c9: Pull complete | |
d4c3ef1258ee: Pull complete | |
7767cdbe143c: Pull complete | |
925d0c4eea93: Pull complete | |
5d0b86b0e2c6: Pull complete | |
Digest: sha256:c106c6849231d8a7030bcca79c0b757ae70164ae22ec796c2100d24c58925b5a | |
Status: Downloaded newer image for elasticsearch:2.3.5 | |
+ mkdir -p /var/lib/dokku/services/elasticsearch/test | |
+ mkdir -p /var/lib/dokku/services/elasticsearch/test/data | |
+ mkdir -p /var/lib/dokku/services/elasticsearch/test/config | |
+ touch /var/lib/dokku/services/elasticsearch/test/LINKS | |
+ [[ -n '' ]] | |
+ echo '' | |
+ service_create_container test | |
+ local SERVICE=test | |
+ local SERVICE_ROOT=/var/lib/dokku/services/elasticsearch/test | |
++ get_service_name test | |
++ declare 'desc=Retrieves a docker service label' | |
++ declare SERVICE=test | |
++ echo dokku.elasticsearch.test | |
+ local SERVICE_NAME=dokku.elasticsearch.test | |
++ docker run --name dokku.elasticsearch.test -v /var/lib/dokku/services/elasticsearch/test/data:/usr/share/elasticsearch/data -v /var/lib/dokku/services/elasticsearch/test/config:/usr/share/elasticsearch/config --env-file=/var/lib/dokku/services/elasticsearch/test/ENV -d --restart always --label dokku=service --label dokku.service=elasticsearch elasticsearch:2.3.5 | |
+ ID=b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d | |
+ echo b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d | |
+ dokku_log_info2 'Copying config files into place' | |
+ declare 'desc=log info2 formatter' | |
+ echo '=====> Copying config files into place' | |
=====> Copying config files into place | |
+ retry-docker-command b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ local ID=b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'COMMAND=cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ local i=0 success=false | |
+ '[' 0 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ exit_code=129 | |
+ set -e | |
+ [[ 129 == 0 ]] | |
+ i=1 | |
+ sleep 1 | |
+ '[' 1 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ exit_code=129 | |
+ set -e | |
+ [[ 129 == 0 ]] | |
+ i=2 | |
+ sleep 1 | |
+ '[' 2 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ exit_code=0 | |
+ set -e | |
+ [[ 0 == 0 ]] | |
+ success=true | |
+ break | |
+ [[ 2 -gt 0 ]] | |
+ dokku_log_verbose 'Container command retried 2 time(s): cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
+ declare 'desc=log verbose formatter' | |
+ echo ' Container command retried 2 time(s): cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/' | |
Container command retried 2 time(s): cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/ | |
+ [[ true == \t\r\u\e ]] | |
+ retry-docker-command b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'echo '\''network.host: 0.0.0.0'\'' >> /usr/share/elasticsearch/config/elasticsearch.yml' | |
+ local ID=b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'COMMAND=echo '\''network.host: 0.0.0.0'\'' >> /usr/share/elasticsearch/config/elasticsearch.yml' | |
+ local i=0 success=false | |
+ '[' 0 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'echo '\''network.host: 0.0.0.0'\'' >> /usr/share/elasticsearch/config/elasticsearch.yml' | |
+ exit_code=0 | |
+ set -e | |
+ [[ 0 == 0 ]] | |
+ success=true | |
+ break | |
+ [[ 0 -gt 0 ]] | |
+ [[ true == \t\r\u\e ]] | |
+ retry-docker-command b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'rm -rf /etc/elasticsearch && ln -sfn /usr/share/elasticsearch/config /etc/elasticsearch' | |
+ local ID=b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'COMMAND=rm -rf /etc/elasticsearch && ln -sfn /usr/share/elasticsearch/config /etc/elasticsearch' | |
+ local i=0 success=false | |
+ '[' 0 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'rm -rf /etc/elasticsearch && ln -sfn /usr/share/elasticsearch/config /etc/elasticsearch' | |
+ exit_code=0 | |
+ set -e | |
+ [[ 0 == 0 ]] | |
+ success=true | |
+ break | |
+ [[ 0 -gt 0 ]] | |
+ [[ true == \t\r\u\e ]] | |
+ retry-docker-command b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'chown -R root:elasticsearch /etc/elasticsearch' | |
+ local ID=b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d 'COMMAND=chown -R root:elasticsearch /etc/elasticsearch' | |
+ local i=0 success=false | |
+ '[' 0 -ge 10 ']' | |
+ set +e | |
+ docker exec -it b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d bash -c 'chown -R root:elasticsearch /etc/elasticsearch' | |
+ exit_code=0 | |
+ set -e | |
+ [[ 0 == 0 ]] | |
+ success=true | |
+ break | |
+ [[ 0 -gt 0 ]] | |
+ [[ true == \t\r\u\e ]] | |
+ docker restart b8c405f211d94b60fe53bd48312a2e3e8f0837ea1b1d1c523658e810af309f2d | |
+ dokku_log_verbose_quiet 'Waiting for container to be ready' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' Waiting for container to be ready' | |
Waiting for container to be ready | |
+ docker run --rm --link dokku.elasticsearch.test:elasticsearch dokkupaas/wait -p 9200 | |
docker: Error response from daemon: oci runtime error: exec: "-p": executable file not found in $PATH. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment