Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install dokku on AWS ec2 instance #3717

Closed
rkamran1 opened this issue Oct 17, 2019 · 21 comments · Fixed by #3755

Comments

@rkamran1
Copy link

@rkamran1 rkamran1 commented Oct 17, 2019

Description of problem

Unable to install dokku on AWS ec2 instance

How reproducible

wget https://raw.githubusercontent.com/dokku/dokku/v0.19.1/bootstrap.sh
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh

Steps to Reproduce

  1. Created a fresh instance
  2. Ran sudo apt-get update
  3. Ran installation commands

Actual Results

First Time the error was this.

Errors were encountered while processing: /tmp/apt-dpkg-install-OrzbyA/0-dokku_0.19.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

After I ran again
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh

and the error changed to this.
Preparing to install v0.19.1 from https://github.com/dokku/dokku.git...
--> Ensuring we have the proper dependencies

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Expected Results

it should install dokku

Environment Information

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

The server is this one
Screenshot 2019-10-18 at 3 39 32 PM
with
64-bit (x86) selected

@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 17, 2019

Is that the entire output of the installation process? Can you paste which AMI you used to create this?

@rkamran1

This comment has been minimized.

Copy link
Author

@rkamran1 rkamran1 commented Oct 18, 2019

I have update the description with the more information. Can you please guide me.

@rkamran1

This comment has been minimized.

Copy link
Author

@rkamran1 rkamran1 commented Oct 18, 2019

I have terminated that instance and created a new instance of Ubuntu 16.04. Still getting the same error.

The full trace of the error is:

sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh
Preparing to install v0.19.1 from https://github.com/dokku/dokku.git...
--> Ensuring we have the proper dependencies
--> Initial apt-get update
--> Installing docker
# Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
2019-10-18 14:30:57 URL:https://get.docker.com/ [13216/13216] -> "-" [1]
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.3
 API version:       1.40
 Go version:        go1.12.10
 Git commit:        a872fc2
 Built:             Tue Oct  8 00:59:54 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.3
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.10
  Git commit:       a872fc2
  Built:            Tue Oct  8 00:58:28 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
--> Installing dokku
2019-10-18 14:31:18 URL:https://d28dx6y1hfq314.cloudfront.net/505/623/gpg/dokku-dokku-FB2B6AA421CD193F.pub.gpg?t=1571409378_696430c00c2ca5e52078314917eae96f6344ac50 [3937/3937] -> "-" [1]
OK
deb https://packagecloud.io/dokku/dokku/ubuntu/ xenial main
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 51613 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.3-0ubuntu0.16.04.4_all.deb ...
Unpacking nginx-common (1.10.3-0ubuntu0.16.04.4) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../fonts-dejavu-core_2.35-1_all.deb ...
Unpacking fonts-dejavu-core (2.35-1) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../fontconfig-config_2.11.94-0ubuntu1.1_all.deb ...
Unpacking fontconfig-config (2.11.94-0ubuntu1.1) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../libfontconfig1_2.11.94-0ubuntu1.1_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.11.94-0ubuntu1.1) ...
Selecting previously unselected package libjpeg-turbo8:amd64.
Preparing to unpack .../libjpeg-turbo8_1.4.2-0ubuntu3.1_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.1) ...
Selecting previously unselected package libjpeg8:amd64.
Preparing to unpack .../libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../libjbig0_2.1-3.1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../libtiff5_4.0.6-1ubuntu0.7_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.6-1ubuntu0.7) ...
Selecting previously unselected package libvpx3:amd64.
Preparing to unpack .../libvpx3_1.5.0-2ubuntu1_amd64.deb ...
Unpacking libvpx3:amd64 (1.5.0-2ubuntu1) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../libxpm4_1%3a3.5.11-1ubuntu0.16.04.1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.11-1ubuntu0.16.04.1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../libgd3_2.1.1-4ubuntu0.16.04.11_amd64.deb ...
Unpacking libgd3:amd64 (2.1.1-4ubuntu0.16.04.11) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../nginx-core_1.10.3-0ubuntu0.16.04.4_amd64.deb ...
Unpacking nginx-core (1.10.3-0ubuntu0.16.04.4) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.10.3-0ubuntu0.16.04.4_all.deb ...
Unpacking nginx (1.10.3-0ubuntu0.16.04.4) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package plugn.
Preparing to unpack .../archives/plugn_0.3.2_amd64.deb ...
Unpacking plugn (0.3.2) ...
Selecting previously unselected package sshcommand.
Preparing to unpack .../sshcommand_0.8.0_amd64.deb ...
Unpacking sshcommand (0.8.0) ...
Selecting previously unselected package gliderlabs-sigil.
Preparing to unpack .../gliderlabs-sigil_0.4.0_amd64.deb ...
Unpacking gliderlabs-sigil (0.4.0) ...
Selecting previously unselected package procfile-util.
Preparing to unpack .../procfile-util_0.7.0_amd64.deb ...
Unpacking procfile-util (0.7.0) ...
Selecting previously unselected package dos2unix.
Preparing to unpack .../dos2unix_6.0.4-1_amd64.deb ...
Unpacking dos2unix (6.0.4-1) ...
Selecting previously unselected package libonig2:amd64.
Preparing to unpack .../libonig2_5.9.6-1ubuntu0.1_amd64.deb ...
Unpacking libonig2:amd64 (5.9.6-1ubuntu0.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../jq_1.5+dfsg-1ubuntu0.1_amd64.deb ...
Unpacking jq (1.5+dfsg-1ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.22) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up nginx-common (1.10.3-0ubuntu0.16.04.4) ...
Setting up fonts-dejavu-core (2.35-1) ...
Setting up fontconfig-config (2.11.94-0ubuntu1.1) ...
Setting up libfontconfig1:amd64 (2.11.94-0ubuntu1.1) ...
Setting up libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.1) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up libjbig0:amd64 (2.1-3.1) ...
Setting up libtiff5:amd64 (4.0.6-1ubuntu0.7) ...
Setting up libvpx3:amd64 (1.5.0-2ubuntu1) ...
Setting up libxpm4:amd64 (1:3.5.11-1ubuntu0.16.04.1) ...
Setting up libgd3:amd64 (2.1.1-4ubuntu0.16.04.11) ...
Setting up nginx-core (1.10.3-0ubuntu0.16.04.4) ...
Setting up nginx (1.10.3-0ubuntu0.16.04.4) ...
Setting up cgroupfs-mount (1.2) ...
Setting up plugn (0.3.2) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.22) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Selecting previously unselected package dokku.
(Reading database ... 51883 files and directories currently installed.)
Preparing to unpack .../dokku_0.19.1_amd64.deb ...
[ ok ] Reloading nginx configuration (via systemctl): nginx.service.
Error: keyfile '/root/.ssh/id_rsa.pub' not found.
       you can enter a new keyfile path when you restart the installation.
dpkg: error processing archive /var/cache/apt/archives/dokku_0.19.1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Selecting previously unselected package herokuish.
Preparing to unpack .../herokuish_0.5.3_amd64.deb ...
Unpacking herokuish (0.5.3) ...
Selecting previously unselected package libsensors4:amd64.
Preparing to unpack .../libsensors4_1%3a3.4.0-2_amd64.deb ...
Unpacking libsensors4:amd64 (1:3.4.0-2) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../sysstat_11.2.0-1ubuntu0.2_amd64.deb ...
Unpacking sysstat (11.2.0-1ubuntu0.2) ...
Selecting previously unselected package dokku-update.
Preparing to unpack .../dokku-update_0.1.0_amd64.deb ...
Unpacking dokku-update (0.1.0) ...
Selecting previously unselected package parallel.
Preparing to unpack .../parallel_20161222-1~ubuntu0.16.04.1_all.deb ...
Adding 'diversion of /usr/bin/parallel to /usr/bin/parallel.moreutils by parallel'
Adding 'diversion of /usr/share/man/man1/parallel.1.gz to /usr/share/man/man1/parallel.moreutils.1.gz by parallel'
Unpacking parallel (20161222-1~ubuntu0.16.04.1) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.22) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/dokku_0.19.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 18, 2019

Error: keyfile '/root/.ssh/id_rsa.pub' not found.
       you can enter a new keyfile path when you restart the installation.

This is the error. You'll need to set a public key there if you want to continue.

@rkamran1

This comment has been minimized.

Copy link
Author

@rkamran1 rkamran1 commented Oct 18, 2019

@josegonzalez Thanks this issue is resolved but after this there is another error which is coming let me paste the output.

sudo DOKKU_TAG=v0.19.2 bash bootstrap.sh
Preparing to install v0.19.2 from https://github.com/dokku/dokku.git...
--> Ensuring we have the proper dependencies

--> Initial apt-get update
Selecting previously unselected package apt-transport-https.
(Reading database ... 56531 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.12_all.deb ...
Unpacking apt-transport-https (1.6.12) ...
Setting up apt-transport-https (1.6.12) ...
--> Installing docker
# Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
2019-10-18 18:31:36 URL:https://get.docker.com/ [13216/13216] -> "-" [1]
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.4
 API version:       1.40
 Go version:        go1.12.10
 Git commit:        9013bf583a
 Built:             Fri Oct 18 15:54:09 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.4
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.10
  Git commit:       9013bf583a
  Built:            Fri Oct 18 15:52:40 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
--> Installing dokku
2019-10-18 18:32:01 URL:https://d28dx6y1hfq314.cloudfront.net/505/623/gpg/dokku-dokku-FB2B6AA421CD193F.pub.gpg?t=1571423821_6bebcc30ee01cbe56e506513219c125cff5abe2a [3937/3937] -> "-" [1]
OK
deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 56763 files and directories currently installed.)
Preparing to unpack .../00-nginx-common_1.14.0-0ubuntu1.6_all.deb ...
Unpacking nginx-common (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package libnginx-mod-http-geoip.
Preparing to unpack .../01-libnginx-mod-http-geoip_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking libnginx-mod-http-geoip (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../02-fonts-dejavu-core_2.37-1_all.deb ...
Unpacking fonts-dejavu-core (2.37-1) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../03-fontconfig-config_2.12.6-0ubuntu2_all.deb ...
Unpacking fontconfig-config (2.12.6-0ubuntu2) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../04-libfontconfig1_2.12.6-0ubuntu2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Selecting previously unselected package libjpeg-turbo8:amd64.
Preparing to unpack .../05-libjpeg-turbo8_1.5.2-0ubuntu5.18.04.1_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.1) ...
Selecting previously unselected package libjpeg8:amd64.
Preparing to unpack .../06-libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../07-libjbig0_2.1-3.1build1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1build1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../08-libtiff5_4.0.9-5ubuntu0.3_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.9-5ubuntu0.3) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../09-libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../10-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../11-libgd3_2.2.5-4ubuntu0.3_amd64.deb ...
Unpacking libgd3:amd64 (2.2.5-4ubuntu0.3) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../12-libnginx-mod-http-image-filter_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../13-libnginx-mod-http-xslt-filter_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../14-libnginx-mod-mail_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking libnginx-mod-mail (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../15-libnginx-mod-stream_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking libnginx-mod-stream (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../16-nginx-core_1.14.0-0ubuntu1.6_amd64.deb ...
Unpacking nginx-core (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package nginx.
Preparing to unpack .../17-nginx_1.14.0-0ubuntu1.6_all.deb ...
Unpacking nginx (1.14.0-0ubuntu1.6) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../18-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package plugn.
Preparing to unpack .../19-plugn_0.3.2_amd64.deb ...
Unpacking plugn (0.3.2) ...
Selecting previously unselected package sshcommand.
Preparing to unpack .../20-sshcommand_0.8.0_amd64.deb ...
Unpacking sshcommand (0.8.0) ...
Selecting previously unselected package gliderlabs-sigil.
Preparing to unpack .../21-gliderlabs-sigil_0.4.0_amd64.deb ...
Unpacking gliderlabs-sigil (0.4.0) ...
Selecting previously unselected package procfile-util.
Preparing to unpack .../22-procfile-util_0.7.0_amd64.deb ...
Unpacking procfile-util (0.7.0) ...
Selecting previously unselected package dos2unix.
Preparing to unpack .../23-dos2unix_7.3.4-3_amd64.deb ...
Unpacking dos2unix (7.3.4-3) ...
Selecting previously unselected package libonig4:amd64.
Preparing to unpack .../24-libonig4_6.7.0-1_amd64.deb ...
Unpacking libonig4:amd64 (6.7.0-1) ...
Selecting previously unselected package libjq1:amd64.
Preparing to unpack .../25-libjq1_1.5+dfsg-2_amd64.deb ...
Unpacking libjq1:amd64 (1.5+dfsg-2) ...
Selecting previously unselected package jq.
Preparing to unpack .../26-jq_1.5+dfsg-2_amd64.deb ...
Unpacking jq (1.5+dfsg-2) ...
Setting up nginx-common (1.14.0-0ubuntu1.6) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
Setting up libnginx-mod-http-geoip (1.14.0-0ubuntu1.6) ...
Setting up fonts-dejavu-core (2.37-1) ...
Setting up fontconfig-config (2.12.6-0ubuntu2) ...
Setting up libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Setting up libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.1) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up libjbig0:amd64 (2.1-3.1build1) ...
Setting up libtiff5:amd64 (4.0.9-5ubuntu0.3) ...
Setting up libwebp6:amd64 (0.6.1-2) ...
Setting up libxpm4:amd64 (1:3.5.12-1) ...
Setting up libgd3:amd64 (2.2.5-4ubuntu0.3) ...
Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1.6) ...
Setting up libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.6) ...
Setting up libnginx-mod-mail (1.14.0-0ubuntu1.6) ...
Setting up libnginx-mod-stream (1.14.0-0ubuntu1.6) ...
Setting up nginx-core (1.14.0-0ubuntu1.6) ...
Setting up nginx (1.14.0-0ubuntu1.6) ...
Setting up cgroupfs-mount (1.4) ...
Setting up plugn (0.3.2) ...
Selecting previously unselected package dokku.
(Reading database ... 57142 files and directories currently installed.)
Preparing to unpack .../0-dokku_0.19.2_amd64.deb ...
[ ok ] Reloading nginx configuration (via systemctl): nginx.service.
Unpacking dokku (0.19.2) ...
Selecting previously unselected package herokuish.
Preparing to unpack .../1-herokuish_0.5.3_amd64.deb ...
Unpacking herokuish (0.5.3) ...
Selecting previously unselected package libsensors4:amd64.
Preparing to unpack .../2-libsensors4_1%3a3.4.0-4_amd64.deb ...
Unpacking libsensors4:amd64 (1:3.4.0-4) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../3-sysstat_11.6.1-1_amd64.deb ...
Unpacking sysstat (11.6.1-1) ...
Selecting previously unselected package dokku-update.
Preparing to unpack .../4-dokku-update_0.1.0_amd64.deb ...
Unpacking dokku-update (0.1.0) ...
Selecting previously unselected package parallel.
Preparing to unpack .../5-parallel_20161222-1_all.deb ...
Adding 'diversion of /usr/bin/parallel to /usr/bin/parallel.moreutils by parallel'
Adding 'diversion of /usr/share/man/man1/parallel.1.gz to /usr/share/man/man1/parallel.moreutils.1.gz by parallel'
Unpacking parallel (20161222-1) ...
Setting up libonig4:amd64 (6.7.0-1) ...
Setting up procfile-util (0.7.0) ...
Setting up dos2unix (7.3.4-3) ...
Setting up gliderlabs-sigil (0.4.0) ...
Setting up libjq1:amd64 (1.5+dfsg-2) ...
Setting up sshcommand (0.8.0) ...
Setting up libsensors4:amd64 (1:3.4.0-4) ...
Setting up herokuish (0.5.3) ...
Importing herokuish into docker (around 5 minutes)
v0.5.3: Pulling from gliderlabs/herokuish
6abc03819f3e: Pull complete
05731e63f211: Pull complete
0bd67c50d6be: Pull complete
177d5694bbfd: Pull complete
7f8a16e8ebed: Pull complete
d179e7ffc3d9: Pull complete
a156e958fda8: Pull complete
e110587f3d53: Pull complete
8b93d0ac0dd3: Pull complete
e76d205f5d10: Pull complete
bd4ddf6c4ec6: Pull complete
1423af4c8d72: Pull complete
Digest: sha256:bcff679e3076ebb8ba4ea374a2490ce0681946fb1e82ce9a1a2e416648ff8ccf
Status: Downloaded newer image for gliderlabs/herokuish:v0.5.3
docker.io/gliderlabs/herokuish:v0.5.3
Setting up jq (1.5+dfsg-2) ...
Setting up sysstat (11.6.1-1) ...

Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/sysstat.service.
Setting up dokku (0.19.2) ...
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Updating index cache for path `/usr/share/man/man8'. Wait...done.
Checking for stray cats under /usr/share/man...
Checking for stray cats under /var/cache/man...
Purging old database entries in /usr/share/man/de...
Processing manual pages under /usr/share/man/de...
Updating index cache for path `/usr/share/man/de/man1'. Wait...done.
Checking for stray cats under /usr/share/man/de...
Checking for stray cats under /var/cache/man/de...
Purging old database entries in /usr/share/man/es...
Processing manual pages under /usr/share/man/es...
Updating index cache for path `/usr/share/man/es/man1'. Wait...done.
Checking for stray cats under /usr/share/man/es...
Checking for stray cats under /var/cache/man/es...
Purging old database entries in /usr/share/man/pl...
Processing manual pages under /usr/share/man/pl...
Updating index cache for path `/usr/share/man/pl/man1'. Wait...done.
Checking for stray cats under /usr/share/man/pl...
Checking for stray cats under /var/cache/man/pl...
Purging old database entries in /usr/share/man/tr...
Processing manual pages under /usr/share/man/tr...
Purging old database entries in /usr/share/man/sv...
Processing manual pages under /usr/share/man/sv...
Updating index cache for path `/usr/share/man/sv/man1'. Wait...done.
Checking for stray cats under /usr/share/man/sv...
Checking for stray cats under /var/cache/man/sv...
Purging old database entries in /usr/share/man/fi...
Processing manual pages under /usr/share/man/fi...
Purging old database entries in /usr/share/man/ru...
Processing manual pages under /usr/share/man/ru...
Purging old database entries in /usr/share/man/pt_BR...
Processing manual pages under /usr/share/man/pt_BR...
Updating index cache for path `/usr/share/man/pt_BR/man1'. Wait...done.
Checking for stray cats under /usr/share/man/pt_BR...
Checking for stray cats under /var/cache/man/pt_BR...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
Purging old database entries in /usr/share/man/sr...
Processing manual pages under /usr/share/man/sr...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/da...
Processing manual pages under /usr/share/man/da...
Purging old database entries in /usr/share/man/ko...
Processing manual pages under /usr/share/man/ko...
Purging old database entries in /usr/share/man/fr...
Processing manual pages under /usr/share/man/fr...
Updating index cache for path `/usr/share/man/fr/man1'. Wait...done.
Checking for stray cats under /usr/share/man/fr...
Checking for stray cats under /var/cache/man/fr...
Purging old database entries in /usr/share/man/pt...
Processing manual pages under /usr/share/man/pt...
Purging old database entries in /usr/share/man/sl...
Processing manual pages under /usr/share/man/sl...
Purging old database entries in /usr/share/man/nl...
Processing manual pages under /usr/share/man/nl...
Updating index cache for path `/usr/share/man/nl/man1'. Wait...done.
Checking for stray cats under /usr/share/man/nl...
Checking for stray cats under /var/cache/man/nl...
Processing manual pages under /usr/share/man/uk...
Updating index cache for path `/usr/share/man/uk/man1'. Wait...mandb: warning: /usr/share/man/uk/man1/dos2unix.1.gz: whatis parse for unix2dos(1) failed
mandb: warning: /usr/share/man/uk/man1/dos2unix.1.gz: whatis parse for unix2mac(1) failed
mandb: warning: /usr/share/man/uk/man1/dos2unix.1.gz: whatis parse for mac2unix(1) failed
mandb: warning: /usr/share/man/uk/man1/dos2unix.1.gz: whatis parse for dos2unix(1) failed
done.
Checking for stray cats under /usr/share/man/uk...
Checking for stray cats under /var/cache/man/uk...
Purging old database entries in /usr/share/man/it...
Processing manual pages under /usr/share/man/it...
Purging old database entries in /usr/share/man/ja...
Processing manual pages under /usr/share/man/ja...
Purging old database entries in /usr/share/man/zh_CN...
Processing manual pages under /usr/share/man/zh_CN...
Updating index cache for path `/usr/share/man/zh_CN/man1'. Wait...done.
Checking for stray cats under /usr/share/man/zh_CN...
Checking for stray cats under /var/cache/man/zh_CN...
Purging old database entries in /usr/share/man/hu...
Processing manual pages under /usr/share/man/hu...
Purging old database entries in /usr/share/man/zh_TW...
Processing manual pages under /usr/share/man/zh_TW...
Processing manual pages under /usr/local/man...
12 man subdirectories contained newer manual pages.
73 manual pages were added.
0 stray cats were added.
5 old database entries were purged.
Setting up dokku user
Adding user `dokku' ...
Adding new group `dokku' (1001) ...
Adding new user `dokku' (1001) with group `dokku' ...
Creating home directory `/home/dokku' ...
Copying files from `/etc/skel' ...
docker:x:999:
Setting up storage directories
Setting up plugin directories
Migrating old plugins
Enabling all core plugins
Install all core plugins
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
............................................................................................................................................................................................++*++*++*++*
Adding user dokku to group adm
[ ok ] Starting nginx (via systemctl): nginx.service.
-----> Priming bash-completion cache
Ensure proper sshcommand path
Setting up dokku-installer
Traceback (most recent call last):
  File "/usr/share/dokku/contrib/dokku-installer.py", line 23, in <module>
    if ':' in hostname:
TypeError: a bytes-like object is required, not 'str'
dpkg: error processing package dokku (--configure):
 installed dokku package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of dokku-update:
 dokku-update depends on dokku; however:
  Package dokku is not configured yet.

dpkg: error processing package dokku-update (--configure):
 dependency problems - leaving unconfigured
Setting up parallel (20161222-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for systemd (237-3ubuntu10.29) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 dokku
 dokku-update
E: Sub-process /usr/bin/dpkg returned an error code (1)
@Koeng101

This comment has been minimized.

Copy link

@Koeng101 Koeng101 commented Oct 20, 2019

I have also encountered the two errors reported while attempting a dokku install. Previously, this script has worked for me, so possibly an update has caused this error? Am interested in what is causing this.

[Not posting terminal output because it is basically the same]

@markuspoerschke

This comment has been minimized.

Copy link

@markuspoerschke markuspoerschke commented Oct 20, 2019

I can confirm this issue.

It looks like the cause of this problem is a problem in the Python script:

Traceback (most recent call last):
  File "/usr/share/dokku/contrib/dokku-installer.py", line 23, in <module>
    if ':' in hostname:
TypeError: a bytes-like object is required, not 'str'

The content of the Python file:

hostname = ''
try:
    command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'"
    hostname = subprocess.check_output(command, shell=True)
    if ':' in hostname:
        hostname = ''
except subprocess.CalledProcessError:
    pass
@s-h-a-d-o-w

This comment has been minimized.

Copy link

@s-h-a-d-o-w s-h-a-d-o-w commented Oct 20, 2019

Error: keyfile '/root/.ssh/id_rsa.pub' not found.
       you can enter a new keyfile path when you restart the installation.

This is the error. You'll need to set a public key there if you want to continue.

In that case, I'd recommend to update the "Getting Started" instructions because there, it says: "Dokku is designed for usage on a fresh VM installation,"

But of course there are no SSH keys on a fresh VM...

(I'm facing the same problem right now.)

@PabOu-be

This comment has been minimized.

Copy link

@PabOu-be PabOu-be commented Oct 21, 2019

Got the same two issues on a brand new ubuntu 18.04 installation with all the upgrades.
Works fine with v0.19.1.

@s-h-a-d-o-w

This comment has been minimized.

Copy link

@s-h-a-d-o-w s-h-a-d-o-w commented Oct 21, 2019

Works fine with v0.19.1.

Thanks for mentioning that! Now I got it running too. After installing python.
I don't know whether v0.19.2 installs python by itself but if not, there's another thing that should go into the "Getting Started" requirements.

@Koeng101

This comment has been minimized.

Copy link

@Koeng101 Koeng101 commented Oct 21, 2019

Strange. With v0.19.1 I still get the error

Adding user dokku to group adm
[ ok ] Starting nginx (via systemctl): nginx.service.
-----> Priming bash-completion cache
Ensure proper sshcommand path
Setting up dokku-installer
Traceback (most recent call last):
  File "/usr/share/dokku/contrib/dokku-installer.py", line 23, in <module>
    if ':' in hostname:
TypeError: a bytes-like object is required, not 'str'
dpkg: error processing package dokku (--configure):
 installed dokku package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of dokku-update:
 dokku-update depends on dokku; however:
  Package dokku is not configured yet.

dpkg: error processing package dokku-update (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 dokku
 dokku-update
E: Sub-process /usr/bin/dpkg returned an error code (1)
@MaddoxDevelopment

This comment has been minimized.

Copy link

@MaddoxDevelopment MaddoxDevelopment commented Oct 21, 2019

I am getting this issue as well on a brand new fresh Ubuntu 18.04 instance on UpCloud. Worked fine with the previous Dokku version from a few weeks ago.

@MaddoxDevelopment

This comment has been minimized.

Copy link

@MaddoxDevelopment MaddoxDevelopment commented Oct 21, 2019

v0.18.5 seems to be the latest version that works.

@toanalien

This comment has been minimized.

Copy link

@toanalien toanalien commented Oct 22, 2019

josegonzalez added a commit that referenced this issue Oct 22, 2019
This actually breaks compatability since now we drop python2 support completely, but it's worth it to fix the weird issues with trying to support both versions.

Closes #3740
Closes #3752
Refs #3717
@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 22, 2019

Mind trying the latest Dokku version instead of that python workaround?

@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 22, 2019

I'll take a look at the ssh key issue today/tomorrow/

@dean1012

This comment has been minimized.

Copy link
Contributor

@dean1012 dean1012 commented Oct 22, 2019

@josegonzalez this is related to dokku/dokku-daemon#26 as well

I verified with a local VM install of Ubuntu Bionic that versions 0.19.0 and higher of dokku will not install from a fresh system due to this key error.

Interestingly, if I install 0.18.3 then upgrade to 0.19.3 it works fine.

I believe once this is resolved, you can start the Travis run again for dokku/dokku-daemon and it will pass.

@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 22, 2019

Whats weird is that I don't think I've touched any of that for 0.19.x, so I'd be curious to see what actually is causing that issue... Will be a fun one to debug, I might make it such that we just don't import it if the file doesn't exist, but output a message to stderr...

@dean1012

This comment has been minimized.

Copy link
Contributor

@dean1012 dean1012 commented Oct 22, 2019

For what it's worth, i'm investigating too but if you happen to find the answer first be my guest.

@dean1012

This comment has been minimized.

Copy link
Contributor

@dean1012 dean1012 commented Oct 22, 2019

@josegonzalez can you clarify by chance what this key is being used for?

It looks from the source like it's being used to setup the public key on the dokku user but when I setup a key and then successfully ran the installer I didn't see the key setup on the dokku user.

Understanding that component better may lead to a better resolution.

I can confirm this affects installation whether you are using bootstrap script or straight deb install (such as through the Travis/Makefile commands on dokku/dokku-daemon).

From what it seems, the installers for dokku pretty much assume that you are running in a cloud environment where you would almost be guaranteed to have a key setup on the server.

Without knowing further information, I think the best solution would probably be to silently ignore the key file if it does not exist OR to silently create a new key if needed before that part of the installation.

I'd avoid sending output through stderr in this case because it may cause the apt deb to fail installation.

@josegonzalez

This comment has been minimized.

Copy link
Member

@josegonzalez josegonzalez commented Oct 22, 2019

Output on stderr doesn't fail a deb deploy, only non-zero exit will. You could consider it a warning.

The key is used for the initial ssh push user.

Mind jumping on slack? We can probably discuss this better in realtime, and then summarize what the solution should be here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.