mongo:connect exec fails
mohamedeliwa opened this issue · 5 comments
Description of problem
Fresh Dokku install with a deployed nodejs app and a created mongo service, on Ubuntu server 20.04.2 on a physical machine pc with processor type x86_64
.
- my nodejs app fails to connect to the mongo service saying
Authentication failed
- trying to connect using
dokku mongo:connect <service>
fails - trying to connect using
dokku mongo:connect-admin <service>
fails
How reproducible
Steps to Reproduce
- Fresh Ubuntu server
20.04.2 lts
install - Installed the latest dokku using
$ wget https://dokku.com/install/v0.30.1/bootstrap.sh
$ sudo DOKKU_TAG=v0.30.1 bash bootstrap.sh
- Created a new app using
$ dokku apps:create <myapp>
- Installed latest mongo using
$ sudo dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo
- Created a mongo service using
$ dokku mongo:create <service>
- Failed and gave me this error
MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
- Destroyed the defective mongo service
- Installed a lower version instead using
$ dokku mongo:create <service> -I 4.4.6
- deployed my app using GIT
- linked the service to my app using
$ dokku mongo:link <service> <myapp>
- my app fails to connect to the database, and logs this error message
MongoServerError: Authentication failed.
- logging the database service shows this message
{extraInfo":{},"error":"UserNotFound: Could not find user "" for db }}
- Connecting to database service using
dokku mongo:connect <service name>
Fails gives this error
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongosh": executable file not found in $PATH: unknown
Actual Results
Database service is created and linked to my nodejs app successfully but my nodejs app fails to authenticate to it,
However the app uses the correct MONGO_URL
env variable.
Expected Results
Environment Information
dokku report APP_NAME
output
-----> uname: Linux homeserver 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 3856 868 239 1 2748 2700
Swap: 3849 0 3849
-----> docker version:
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:47:01 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.19.5
Git commit: bc3805a
Built: Thu Feb 9 19:47:01 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
-----> docker daemon info:
Client:
Context: default
Debug Mode: true
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.16.0
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: 6
Running: 3
Paused: 0
Stopped: 3
Images: 15
Server Version: 23.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: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-67-generic
Operating System: Ubuntu 22.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.766GiB
Name: homeserver
ID: 1bccc337-c207-4ac7-bb38-4fac918f1627
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
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.40
buildpacks:
heroku-buildpack-multi v1.2.0
heroku-buildpack-ruby v244
heroku-buildpack-nodejs v202
heroku-buildpack-clojure v90
heroku-buildpack-python v223
heroku-buildpack-java v72
heroku-buildpack-gradle v38
heroku-buildpack-scala v96
heroku-buildpack-play v26
heroku-buildpack-php v227
heroku-buildpack-go v169
heroku-buildpack-nginx v22
buildpack-null v3
-----> dokku version: dokku version 0.30.1
-----> plugn version: plugn: 0.12.0build+3a27594
-----> dokku plugins:
00_dokku-standard 0.30.1 enabled dokku core standard plugin
20_events 0.30.1 enabled dokku core events logging plugin
app-json 0.30.1 enabled dokku core app-json plugin
apps 0.30.1 enabled dokku core apps plugin
builder 0.30.1 enabled dokku core builder plugin
builder-dockerfile 0.30.1 enabled dokku core builder-dockerfile plugin
builder-herokuish 0.30.1 enabled dokku core builder-herokuish plugin
builder-lambda 0.30.1 enabled dokku core builder-lambda plugin
builder-null 0.30.1 enabled dokku core builder-null plugin
builder-pack 0.30.1 enabled dokku core builder-pack plugin
buildpacks 0.30.1 enabled dokku core buildpacks plugin
caddy-vhosts 0.30.1 enabled dokku core caddy-vhosts plugin
certs 0.30.1 enabled dokku core certificate management plugin
checks 0.30.1 enabled dokku core checks plugin
common 0.30.1 enabled dokku core common plugin
config 0.30.1 enabled dokku core config plugin
cron 0.30.1 enabled dokku core cron plugin
docker-options 0.30.1 enabled dokku core docker-options plugin
domains 0.30.1 enabled dokku core domains plugin
enter 0.30.1 enabled dokku core enter plugin
git 0.30.1 enabled dokku core git plugin
haproxy-vhosts 0.30.1 enabled dokku core haproxy-vhosts plugin
logs 0.30.1 enabled dokku core logs plugin
mongo 1.33.0 enabled dokku mongo service plugin
network 0.30.1 enabled dokku core network plugin
nginx-vhosts 0.30.1 enabled dokku core nginx-vhosts plugin
plugin 0.30.1 enabled dokku core plugin plugin
proxy 0.30.1 enabled dokku core proxy plugin
ps 0.30.1 enabled dokku core ps plugin
registry 0.30.1 enabled dokku core registry plugin
repo 0.30.1 enabled dokku core repo plugin
resource 0.30.1 enabled dokku core resource plugin
run 0.30.1 enabled dokku core run plugin
scheduler 0.30.1 enabled dokku core scheduler plugin
scheduler-docker-local 0.30.1 enabled dokku core scheduler-docker-local plugin
scheduler-null 0.30.1 enabled dokku core scheduler-null plugin
shell 0.30.1 enabled dokku core shell plugin
ssh-keys 0.30.1 enabled dokku core ssh-keys plugin
storage 0.30.1 enabled dokku core storage plugin
trace 0.30.1 enabled dokku core trace plugin
traefik-vhosts 0.30.1 enabled dokku core traefik-vhosts plugin
=====> productionserver app-json information
App json computed selected: app.json
App json global selected: app.json
App json selected:
=====> productionserver app information
App created at: 1679152415
App deploy source: productionserver
App deploy source metadata: productionserver
App dir: /home/dokku/productionserver
App locked: true
=====> productionserver builder information
Builder build dir:
Builder computed build dir:
Builder computed selected:
Builder global build dir:
Builder global selected:
Builder selected:
=====> productionserver builder-dockerfile information
Builder dockerfile computed dockerfile path: Dockerfile
Builder dockerfile global dockerfile path: Dockerfile
Builder dockerfile dockerfile path:
=====> productionserver builder-lambda information
Builder lambda computed lambdayml path: lambda.yml
Builder lambda global lambdayml path: lambda.yml
Builder lambda lambdayml path:
=====> productionserver builder-pack information
Builder pack computed projecttoml path: project.toml
Builder pack global projecttoml path: project.toml
Builder pack projecttoml path:
=====> productionserver buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-20
Buildpacks global stack:
Buildpacks list:
Buildpacks stack:
=====> productionserver ssl information
Ssl dir: /home/dokku/productionserver/tls
Ssl enabled: false
Ssl hostnames:
Ssl expires at:
Ssl issuer:
Ssl starts at:
Ssl subject:
Ssl verified:
=====> productionserver checks information
Checks disabled list: none
Checks skipped list: none
Checks computed wait to retire: 60
Checks global wait to retire: 60
Checks wait to retire:
=====> productionserver cron information
Cron task count: 0
=====> productionserver docker options information
Docker options build: --link dokku.mongo.productiondatabase:dokku-mongo-productiondatabase
Docker options deploy: --link dokku.mongo.productiondatabase:dokku-mongo-productiondatabase --restart=on-failure:10
Docker options run: --link dokku.mongo.productiondatabase:dokku-mongo-productiondatabase
=====> productionserver domains information
Domains app enabled: false
Domains app vhosts:
Domains global enabled: true
Domains global vhosts: 192.168.1.6
=====> productionserver git information
Git deploy branch: master
Git global deploy branch: master
Git keep git dir: false
Git rev env var: GIT_REV
Git sha: 7cf6531
Git source image:
Git last updated at: 1679153056
=====> productionserver logs information
Logs computed max size: 10m
Logs global max size: 10m
Logs global vector sink:
Logs max size:
Logs vector sink:
=====> productionserver network information
Network attach post create:
Network attach post deploy:
Network bind all interfaces: false
Network computed attach post create:
Network computed attach post deploy:
Network computed bind all interfaces: false
Network computed initial network:
Network computed tld:
Network global attach post create:
Network global attach post deploy:
Network global bind all interfaces: false
Network global initial network:
Network global tld:
Network initial network:
Network static web listener:
Network tld:
Network web listeners: 172.17.0.3:5000
=====> productionserver nginx information
Nginx access log format:
Nginx access log path: /var/log/nginx/productionserver-access.log
Nginx bind address ipv4:
Nginx bind address ipv6: ::
Nginx client max body size:
Nginx disable custom config: false
Nginx error log path: /var/log/nginx/productionserver-error.log
Nginx global hsts: true
Nginx computed hsts: true
Nginx hsts:
Nginx hsts include subdomains: true
Nginx hsts max age: 15724800
Nginx hsts preload: false
Nginx computed nginx conf sigil path: nginx.conf.sigil
Nginx global nginx conf sigil path: nginx.conf.sigil
Nginx nginx conf sigil path:
Nginx proxy buffer size: 4096
Nginx proxy buffering: on
Nginx proxy buffers: 8 4096
Nginx proxy busy buffers size: 8192
Nginx proxy read timeout: 60s
Nginx last visited at: 1679153535
Nginx x forwarded for value: $remote_addr
Nginx x forwarded port value: $server_port
Nginx x forwarded proto value: $scheme
Nginx x forwarded ssl:
=====> productionserver proxy information
Proxy enabled: true
Proxy port map: http:29517:5000
Proxy type: nginx
=====> productionserver ps information
Deployed: true
Processes: 1
Ps can scale: true
Ps computed procfile path: Procfile
Ps global procfile path: Procfile
Ps procfile path:
Ps restart policy: on-failure:10
Restore: true
Running: true
Status web 1: running (CID: 54401f4f8e4)
=====> productionserver registry information
Registry computed image repo: dokku/productionserver
Registry computed push on release: false
Registry computed server:
Registry global push on release:
Registry global server:
Registry image repo:
Registry push on release:
Registry server:
Registry tag version:
=====> productionserver resource information
=====> productionserver scheduler information
Scheduler computed selected: docker-local
Scheduler global selected: docker-local
Scheduler selected:
=====> productionserver scheduler-docker-local information
Scheduler docker local disable chown:
Scheduler docker local init process: true
Scheduler docker local parallel schedule count:
=====> productionserver storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
On a physical machine
Additional information
$ dokku trace:on
$ dokku mongo:connect database
output
+ 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=247282
+ DOKKU_PID=247282
+ 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 mongo:connect productiondatabase
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('mongo:connect' 'productiondatabase')
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ mongo:connect == \-\-\a\p\p ]]
+ [[ mongo:connect =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ productiondatabase == \-\-\a\p\p ]]
+ [[ productiondatabase =~ ^--.* ]]
+ next_index=3
+ [[ -z '' ]]
++ echo -e ''
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ mongo:connect =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ mongo:connect =~ ^plugin:.* ]]
+ [[ mongo:connect == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ mongo:connect == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ -n '' ]]
+ dokku_auth mongo:connect productiondatabase
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=****
+ SSH_USER=*****
+ export SSH_NAME=default
+ SSH_NAME=default
+ export DOKKU_COMMAND=mongo:connect
+ DOKKU_COMMAND=mongo:connect
++ 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 mongo:connect productiondatabase
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=mongo:connect
+ local PLUGIN_CMD=mongo:connect
+ local implemented=0
+ local script
+ argv=('mongo:connect' 'productiondatabase')
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/mongo
+ [[ /var/lib/dokku/plugins/available/mongo == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo:connect/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo:connect/subcommands/mongo:connect ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo/subcommands/connect ]]
+ [[ -n connect ]]
+ /var/lib/dokku/plugins/enabled/mongo/subcommands/connect mongo:connect productiondatabase
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/mongo/subcommands/connect
+++ cd /var/lib/dokku/plugins/enabled/mongo/subcommands
+++ pwd
++ dirname /var/lib/dokku/plugins/enabled/mongo/subcommands
+ source /var/lib/dokku/plugins/enabled/mongo/functions
++++ dirname /var/lib/dokku/plugins/enabled/mongo/functions
+++ cd /var/lib/dokku/plugins/enabled/mongo
+++ pwd
++ source /var/lib/dokku/plugins/enabled/mongo/config
+++++ dirname /var/lib/dokku/plugins/enabled/mongo/config
++++ cd /var/lib/dokku/plugins/enabled/mongo
++++ pwd
+++ _DIR=/var/lib/dokku/plugins/enabled/mongo
+++ export MONGO_IMAGE=mongo
+++ MONGO_IMAGE=mongo
+++ export MONGO_IMAGE_VERSION=6.0.4
+++ MONGO_IMAGE_VERSION=6.0.4
+++ export MONGO_ROOT=/var/lib/dokku/services/mongo
+++ MONGO_ROOT=/var/lib/dokku/services/mongo
+++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ export MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
+++ MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
+++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
+++ export PLUGIN_COMMAND_PREFIX=mongo
+++ PLUGIN_COMMAND_PREFIX=mongo
+++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
+++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATASTORE_PORTS=('27017' '27018' '27019' '28017')
+++ export PLUGIN_DATASTORE_PORTS
+++ export PLUGIN_DATASTORE_WAIT_PORT=27017
+++ PLUGIN_DATASTORE_WAIT_PORT=27017
+++ export PLUGIN_DEFAULT_ALIAS=MONGO
+++ PLUGIN_DEFAULT_ALIAS=MONGO
+++ export PLUGIN_DISABLE_PULL=
+++ PLUGIN_DISABLE_PULL=
+++ export PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
+++ PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
+++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ export PLUGIN_IMAGE=mongo
+++ PLUGIN_IMAGE=mongo
+++ export PLUGIN_IMAGE_VERSION=6.0.4
+++ PLUGIN_IMAGE_VERSION=6.0.4
+++ export PLUGIN_SCHEME=mongodb
+++ PLUGIN_SCHEME=mongodb
+++ export PLUGIN_SERVICE=MongoDB
+++ PLUGIN_SERVICE=MongoDB
+++ export PLUGIN_VARIABLE=MONGO
+++ PLUGIN_VARIABLE=MONGO
+++ 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 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
+++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/mongo/functions
+++ cd /var/lib/dokku/plugins/enabled/mongo
+++ pwd
++ source /var/lib/dokku/plugins/enabled/mongo/common-functions
+++++ dirname /var/lib/dokku/plugins/enabled/mongo/common-functions
++++ cd /var/lib/dokku/plugins/enabled/mongo
++++ pwd
+++ source /var/lib/dokku/plugins/enabled/mongo/config
++++++ dirname /var/lib/dokku/plugins/enabled/mongo/config
+++++ cd /var/lib/dokku/plugins/enabled/mongo
+++++ pwd
++++ _DIR=/var/lib/dokku/plugins/enabled/mongo
++++ export MONGO_IMAGE=mongo
++++ MONGO_IMAGE=mongo
++++ export MONGO_IMAGE_VERSION=6.0.4
++++ MONGO_IMAGE_VERSION=6.0.4
++++ export MONGO_ROOT=/var/lib/dokku/services/mongo
++++ MONGO_ROOT=/var/lib/dokku/services/mongo
++++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ export MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
++++ MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
++++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
++++ export PLUGIN_COMMAND_PREFIX=mongo
++++ PLUGIN_COMMAND_PREFIX=mongo
++++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
++++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
++++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATASTORE_PORTS=('27017' '27018' '27019' '28017')
++++ export PLUGIN_DATASTORE_PORTS
++++ export PLUGIN_DATASTORE_WAIT_PORT=27017
++++ PLUGIN_DATASTORE_WAIT_PORT=27017
++++ export PLUGIN_DEFAULT_ALIAS=MONGO
++++ PLUGIN_DEFAULT_ALIAS=MONGO
++++ export PLUGIN_DISABLE_PULL=
++++ PLUGIN_DISABLE_PULL=
++++ export PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
++++ PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
++++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
++++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
++++ export PLUGIN_IMAGE=mongo
++++ PLUGIN_IMAGE=mongo
++++ export PLUGIN_IMAGE_VERSION=6.0.4
++++ PLUGIN_IMAGE_VERSION=6.0.4
++++ export PLUGIN_SCHEME=mongodb
++++ PLUGIN_SCHEME=mongodb
++++ export PLUGIN_SERVICE=MongoDB
++++ PLUGIN_SERVICE=MongoDB
++++ export PLUGIN_VARIABLE=MONGO
++++ PLUGIN_VARIABLE=MONGO
++++ 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 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
++++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
+++ 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-connect-cmd mongo:connect productiondatabase
+ declare 'desc=connect to the service via the mongo connection tool'
+ argv=('mongo:connect' 'productiondatabase')
+ local cmd=mongo:connect argv
+ [[ mongo:connect == \m\o\n\g\o\:\c\o\n\n\e\c\t ]]
+ shift 1
+ declare SERVICE=productiondatabase
+ is_implemented_command mongo:connect
+ declare 'desc=return true if value (mongo:connect) is in list (all other arguments)'
+ declare CMD=mongo:connect
++ echo mongo:connect
++ cut -d : -f2
+ CMD=connect
+ [[ 0 -eq 0 ]]
+ return 0
+ [[ -z productiondatabase ]]
+ verify_service_name productiondatabase
+ declare 'desc=verify that a service exists'
+ declare SERVICE=productiondatabase
+ [[ -z productiondatabase ]]
+ [[ ! -d /var/lib/dokku/services/mongo/productiondatabase ]]
++ auth_service_filter productiondatabase
++ declare 'desc=calls user-service plugin trigger'
++ SERVICES=('productiondatabase')
++ declare SERVICES
++ local user_auth_count
++ [[ 1 -eq 0 ]]
+++ wc -l
+++ find '/var/lib/dokku/plugins/enabled/*/user-auth-service'
++ user_auth_count=0
++ [[ 0 == 0 ]]
++ for SERVICE in "${SERVICES[@]}"
++ [[ -n productiondatabase ]]
++ echo productiondatabase
++ return 0
+ SERVICE=productiondatabase
+ [[ -z productiondatabase ]]
+ return 0
+ service_connect productiondatabase
+ local SERVICE=productiondatabase
+ local SERVICE_ROOT=/var/lib/dokku/services/mongo/productiondatabase
++ get_service_name productiondatabase
++ declare 'desc=retrieve a docker service label'
++ declare SERVICE=productiondatabase
++ echo dokku.mongo.productiondatabase
+ local SERVICE_NAME=dokku.mongo.productiondatabase
++ get_database_name productiondatabase
++ declare 'desc=retrieve a sanitized database name'
++ declare SERVICE=productiondatabase
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/productiondatabase
++ [[ ! -f /var/lib/dokku/services/mongo/productiondatabase/DATABASE_NAME ]]
++ cat /var/lib/dokku/services/mongo/productiondatabase/DATABASE_NAME
+ local DATABASE_NAME=productiondatabase
++ service_password productiondatabase
++ declare 'desc=fetch the password for a service'
++ declare SERVICE=productiondatabase
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/productiondatabase
++ local PASSWORD_FILE=/var/lib/dokku/services/mongo/productiondatabase/PASSWORD
++ [[ -f /var/lib/dokku/services/mongo/productiondatabase/PASSWORD ]]
++ cat /var/lib/dokku/services/mongo/productiondatabase/PASSWORD
+ local PASSWORD=*******
+ local SERVICE_TTY_OPTS
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
+ SERVICE_TTY_OPTS=-t
+ docker container exec --env=LANG=C.UTF-8 --env=LC_ALL=C.UTF-8 -i -t dokku.mongo.productiondatabase mongosh -u productiondatabase -p ************** --authenticationDatabase productiondatabase productiondatabase
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongosh": executable file not found in $PATH: unknown
We unfortunately do not support older versions of mongo now and only support versions 0.5.0 and up. You'll need to either:
- use a server that supports AVX
- switch the plugin to version 1.23.2, the last version before we switched how we create users and use mongosh to connect
Maintaining support for a version of mongodb that isn't supported upstream and first came out in 2018 isn't something I am willing to do, so unfortunately the above are your only two options.
As an addendum, if you want to make changes to allow us to support older versions without breaking how we provision for newer versions, I would gladly take the PR. I'd also consider sponsorship of the functionality, given that the version you want is out of support service from upstream so it'll become more difficult to test over time.
@josegonzalez Really thanks for your reply, I was creating this project just to learn and practice dokku, and I'm not intending to use those old versions in serious project development.
I will leave the command to install an old version of mongo here just in case someone faced the same issue as mine.
$ sudo dokku plugin:install https://github.com/dokku/dokku-mongo.git --committish 1.23.2
Makes sense. The avx thing is surely annoying - my local intel test servers don't have it, so soon I won't be able to test a few different tools I use in my homelab - but time marches on :(
unfortunately yes, time marches on
it's my first experience of having a home lab, and it isn't so pleasing :(