dokku: Dokku does not work with libpam-tmpdir
Description of problem:
Attempting to run sudo apt upgrade dokku
results in a failure that’s traceable to a prerm
command on Debian machines.
Output of the following commands
dokku report APP_NAME
: None applicabledocker inspect CONTAINER_ID
(if applicable): None applicablecat /home/dokku/<app>/nginx.conf
(if applicable): None applicable- Link to the exact repository being deployed (if possible/applicable): None
- Output of failing Dokku commands after running
dokku trace on
:
This output is from my sample VM (I have a copy of my production environment):
The following packages will be upgraded:
dokku
Preconfiguring packages ...
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
Need to get 0 B/7,870 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 71052 files and directories currently installed.)
Preparing to unpack .../dokku_0.12.0_amd64.deb ...
Processing upgrade
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 cleanup
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ cleanup =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/2 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ ! cleanup =~ plugin:* ]]
+ [[ ! cleanup == \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 cleanup
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 cleanup
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ cleanup =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/2 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ cleanup =~ ^plugin:.* ]]
+ [[ cleanup == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ -n '' ]]
+ dokku_auth cleanup
+ 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 cleanup
2018/04/09 05:31:10 open /tmp/user/0/bashenv.191568168: permission denied
+ return 1
+ dokku_log_fail 'Access denied'
+ declare 'desc=log fail formatter'
+ echo 'Access denied'
Access denied
+ exit 1
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Processing failed-upgrade
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 cleanup
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ cleanup =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/2 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ ! cleanup =~ plugin:* ]]
+ [[ ! cleanup == \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 cleanup
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 cleanup
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ cleanup =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/2 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ cleanup =~ ^plugin:.* ]]
+ [[ cleanup == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ -n '' ]]
+ dokku_auth cleanup
+ 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 cleanup
2018/04/09 05:31:10 open /tmp/user/0/bashenv.324028899: permission denied
+ return 1
+ dokku_log_fail 'Access denied'
+ declare 'desc=log fail formatter'
+ echo 'Access denied'
Access denied
+ exit 1
dpkg: error processing archive /var/cache/apt/archives/dokku_0.12.0_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/dokku_0.12.0_amd64.deb
Environment details (AWS, VirtualBox, physical, etc.): This occurs in VirtualBox and DigitalOcean
How was Dokku installed?: sudo apt install dokku
How reproducible: Without fail.
Steps to Reproduce:
- Install dokku via the Debian install steps (one or two versions behind).
- Attempt to install a newer version.
Actual Results: The upgrade fails.
Expected Results: The upgrade succeeds and moves Dokku to a newer version.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 26 (13 by maintainers)
Commits related to this issue
- paas: Düzeltilen provizyonlama hatasından sonra DOKKU_TRACE gerekmiyor Meraklısına not. Yaklaşık 2 saatimi alan hatayı düzelten değişiklik: https://github.com/alaturka/she/commit/b6e4cde8782dc675d... — committed to omu/debian by roktas 6 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-clickhouse by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-couchdb by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-elasticsearch by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-graphite by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-mariadb by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-memcached by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-mongo by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-nats by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-mysql by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-omnisci by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-postgres by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-pushpin by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-rabbitmq by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-redis by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-rethinkdb by deleted user 3 years ago
- fix: do not shadow TMPDIR variable This enables usage of the plugin with libpam-tmpdir. Refs dokku/dokku#3149 — committed to dokku/dokku-solr by deleted user 3 years ago
- fix: drop tmpdir environment variables when not running as dokku user This ensures that tmpdir (and related calls) respect the system defaults for temporary directory access. Critically, changing use... — committed to dokku/dokku by josegonzalez 3 years ago
Okay so the
dokku
script seems to be doing it fine, but notgo-basher
. Maybe TMPDIR is being mis-inherited somehow, and not set to the correct value? The docs forlibpam-tmdir
say it defaults to/tmp
in those cases. We might need to print out what theenv
is in this context to debug further…