New docker io package pre installation script subprocess returned error exit status 1

can not successfully install docker-ce on ubuntu 16.04 ? why ,Can you help me? #33689 Comments # apt install docker-ce Jun 15 17:56:40 instance-4u1z1xql dockerd[31531]: time=»2017-06-15T17:56:40.289072089+08:00″ level=info msg=»libcontainerd: new containerd process, pid: 31539″ Jun 15 17:56:41 instance-4u1z1xql kernel: aufs: disagrees about version of symbol module_layout Jun 15 17:56:41 instance-4u1z1xql dockerd[31531]: time=»2017-06-15T17:56:41.299671154+08:00″ level=error msg=»‘overlay’ not […]

Содержание

  1. can not successfully install docker-ce on ubuntu 16.04 ? why ,Can you help me? #33689
  2. Comments
  3. ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) __ Docker Installation Failed #7170
  4. Comments
  5. Problem description
  6. Footer
  7. Installation not working on Ubuntu 19.10 #8891
  8. Comments

can not successfully install docker-ce on ubuntu 16.04 ? why ,Can you help me? #33689

# apt install docker-ce

Jun 15 17:56:40 instance-4u1z1xql dockerd[31531]: time=»2017-06-15T17:56:40.289072089+08:00″ level=info msg=»libcontainerd: new containerd process, pid: 31539″
Jun 15 17:56:41 instance-4u1z1xql kernel: aufs: disagrees about version of symbol module_layout
Jun 15 17:56:41 instance-4u1z1xql dockerd[31531]: time=»2017-06-15T17:56:41.299671154+08:00″ level=error msg=»‘overlay’ not found as a supported filesystem on this host. Jun 15 17:56:41 instance-4u1z1xql kernel: overlay: disagrees about version of symbol module_layout
Jun 15 17:56:41 instance-4u1z1xql dockerd[31531]: time=»2017-06-15T17:56:41.301776138+08:00″ level=error msg=»‘overlay’ not found as a supported filesystem on this host. Jun 15 17:56:41 instance-4u1z1xql kernel: overlay: disagrees about version of symbol module_layout
Jun 15 17:56:41 instance-4u1z1xql kernel: libcrc32c: disagrees about version of symbol module_layout
Jun 15 17:56:41 instance-4u1z1xql kernel: device-mapper: table: 252:0: thin-pool: unknown target type
Jun 15 17:56:41 instance-4u1z1xql kernel: device-mapper: ioctl: error adding target to table
Jun 15 17:56:41 instance-4u1z1xql dockerd[31531]: Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_runJun 15 17:56:41 instance-4u1z1xql systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 15 17:56:41 instance-4u1z1xql systemd[1]: Failed to start Docker Application Container Engine.
— Subject: Unit docker.service has failed
— Defined-By: systemd
— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

The text was updated successfully, but these errors were encountered:

@whxloveyrh DId you removed the previous version of docker?

It seems like your system ports are busy, do check docker ps -a , below is the process to install docker community edition :

Remove previous version of docker and docker engine
$ sudo apt-get remove docker docker-engine

Allow apt to use repo over https
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

Add Docker official’s GPG Key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add —

Setting up stable repository
$ sudo add-apt-repository «deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable»

Above command returns the name of Ubuntu distribution like «Xenial»

Install Docker
$ sudo apt-get update
$ sudo apt-get install docker-ce

Источник

ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) __ Docker Installation Failed #7170

Problem description

Greetings!
I got the last released of Docker for Debian[Kali Linux] from below link:
https://download.docker.com/linux/debian/dists/jessie/pool/stable/amd64/

How to fix the problem !?

The text was updated successfully, but these errors were encountered:

Even i removed and purged the downloaded + installed (failed) Docker and tried to install docker via built-in Debian repositories. but again failed.

debian [39.8 MB] Fetched 39.8 MB in 17s (2,343 kB/s) Selecting previously unselected package docker-ce. (Reading database . 643658 files and directories currently installed.) Preparing to unpack . /docker-ce_18.06.0

debian_amd64.deb . Unpacking docker-ce (18.06.0

debian) . Setting up docker-ce (18.06.0

debian) . update-rc.d: We have no instructions for the docker init script. update-rc.d: It looks like a non-network service, we enable it. Job for docker.service failed because the control process exited with error code. See «systemctl status docker.service» and «journalctl -xe» for details. invoke-rc.d: initscript docker, action «start» failed. ● docker.service — Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Sat 2018-08-04 15:31:03 +0430; 6ms ago Docs: https://docs.docker.com Process: 15457 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) Main PID: 15457 (code=exited, status=1/FAILURE) Tasks: 40 (limit: 4915) Memory: 3.2M CGroup: /system.slice/docker.service Aug 04 15:31:03 kalia.ir systemd[1]: Failed to start Docker Application Container Engine. dpkg: error processing package docker-ce (—configure): installed docker-ce package post-installation script subprocess returned error exit status 1 Processing triggers for systemd (239-7) . Processing triggers for man-db (2.8.3-2) . Errors were encountered while processing: docker-ce E: Sub-process /usr/bin/dpkg returned an error code (1) root@kalia:

# systemctl status docker.service ● docker.service — Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2018-08-04 15:31:05 +0430; 22s ago Docs: https://docs.docker.com Process: 15983 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) Main PID: 15983 (code=exited, status=1/FAILURE) Aug 04 15:31:04 kalia.ir systemd[1]: docker.service: Failed with result ‘exit-code’. Aug 04 15:31:04 kalia.ir systemd[1]: Failed to start Docker Application Container Engine. Aug 04 15:31:05 kalia.ir systemd[1]: docker.service: Service RestartSec=100ms expired, scheduling restart. Aug 04 15:31:05 kalia.ir systemd[1]: docker.service: Scheduled restart job, restart counter is at 4. Aug 04 15:31:05 kalia.ir systemd[1]: Stopped Docker Application Container Engine. Aug 04 15:31:05 kalia.ir systemd[1]: docker.service: Start request repeated too quickly. Aug 04 15:31:05 kalia.ir systemd[1]: docker.service: Failed with result ‘exit-code’. Aug 04 15:31:05 kalia.ir systemd[1]: Failed to start Docker Application Container Engine. root@kalia:

make sure to check the full logs for the docker service (using journalctl ); you’ll likely find the actual error message in there

Closing this ticket due to its age, and the impending refactor. If you think this is in error, feel free to reopen. Thanks!

I know this isn’t a docker.github.io issue, but I just wanted to throw this out there for anyone else that might come across this thread looking for a solution.

I had the same problem. I had Docker running fine on my other machines (laptops and desktops). I was, at the time, running Ubuntu 16.04 on all of my machines.

I could not get the dockerd service to start successfully on my shiny new 16.04 laptop. I would get the same error as the OP here.

I spent hours trying different things with no luck. It turned out it was because my VPN (ExpressVPN) was running. I disconnected the VPN and everything was fine.

I found that it was a networking issue because I ran:

Hope this helps.

running dockerd manually helped me to analyze my problem too.

Thanks for mentioning it!

(base) blueberry@linux:/media/blueberry/595d3676-4ee2-4aa9-b39d-bcd412f9f69a$ sudo dockerd -D
INFO[2022-06-06T15:58:33.871319913+08:00] Starting up
DEBU[2022-06-06T15:58:33.871877590+08:00] Listener created for HTTP on unix (/var/run/docker.sock)
INFO[2022-06-06T15:58:33.872412225+08:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
DEBU[2022-06-06T15:58:33.873148114+08:00] Golang’s threads limit set to 55080
INFO[2022-06-06T15:58:33.873844627+08:00] parsed scheme: «unix» module=grpc
INFO[2022-06-06T15:58:33.873893628+08:00] scheme «unix» not registered, fallback to default scheme module=grpc
DEBU[2022-06-06T15:58:33.873935045+08:00] metrics API listening on /var/run/docker/metrics.sock
INFO[2022-06-06T15:58:33.873966837+08:00] ccResolverWrapper: sending update to cc: <[] > module=grpc
INFO[2022-06-06T15:58:33.874173341+08:00] ClientConn switching balancer to «pick_first» module=grpc
INFO[2022-06-06T15:58:33.875950208+08:00] parsed scheme: «unix» module=grpc
INFO[2022-06-06T15:58:33.876002126+08:00] scheme «unix» not registered, fallback to default scheme module=grpc
INFO[2022-06-06T15:58:33.876063668+08:00] ccResolverWrapper: sending update to cc: <[] > module=grpc
INFO[2022-06-06T15:58:33.876108294+08:00] ClientConn switching balancer to «pick_first» module=grpc
DEBU[2022-06-06T15:58:33.877191273+08:00] processing event stream module=libcontainerd namespace=plugins.moby
DEBU[2022-06-06T15:58:33.877239399+08:00] Using default logging driver json-file
DEBU[2022-06-06T15:58:33.877380276+08:00] [graphdriver] priority list: [btrfs zfs overlay2 fuse-overlayfs aufs overlay devicemapper vfs]
DEBU[2022-06-06T15:58:33.877542446+08:00] zfs command is not available: exec: «zfs»: executable file not found in $PATH storage-driver=zfs
ERRO[2022-06-06T15:58:33.882766877+08:00] failed to mount overlay: no such device storage-driver=overlay2
ERRO[2022-06-06T15:58:33.882974548+08:00] exec: «fuse-overlayfs»: executable file not found in $PATH storage-driver=fuse-overlayfs
ERRO[2022-06-06T15:58:33.885866185+08:00] AUFS was not found in /proc/filesystems storage-driver=aufs
ERRO[2022-06-06T15:58:33.890124306+08:00] failed to mount overlay: no such device storage-driver=overlay
DEBU[2022-06-06T15:58:33.893542995+08:00] Initialized graph driver vfs
DEBU[2022-06-06T15:58:33.893942878+08:00] No quota support for local volumes in /var/lib/docker/volumes: Filesystem does not support, or has not enabled quotas
WARN[2022-06-06T15:58:33.897885701+08:00] Your kernel does not support cgroup memory limit
WARN[2022-06-06T15:58:33.897931202+08:00] Your kernel does not support CPU realtime scheduler
WARN[2022-06-06T15:58:33.898023954+08:00] Unable to find blkio cgroup in mounts
WARN[2022-06-06T15:58:33.898059830+08:00] Unable to find pids cgroup in mounts
DEBU[2022-06-06T15:58:33.898526797+08:00] Max Concurrent Downloads: 3
DEBU[2022-06-06T15:58:33.898569673+08:00] Max Concurrent Uploads: 5
DEBU[2022-06-06T15:58:33.898602923+08:00] Max Download Attempts: 5
INFO[2022-06-06T15:58:33.898670299+08:00] Loading containers: start.
DEBU[2022-06-06T15:58:33.898800094+08:00] Option Experimental: false
DEBU[2022-06-06T15:58:33.898841219+08:00] Option DefaultDriver: bridge
DEBU[2022-06-06T15:58:33.898873887+08:00] Option DefaultNetwork: bridge
DEBU[2022-06-06T15:58:33.898910637+08:00] Network Control Plane MTU: 1500
DEBU[2022-06-06T15:58:33.898898387+08:00] processing event stream module=libcontainerd namespace=moby
WARN[2022-06-06T15:58:33.902704125+08:00] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/5.10.66
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/5.10.66
, error: exit status 1
WARN[2022-06-06T15:58:33.910898070+08:00] Running iptables —wait -t nat -L -n failed with message: iptables v1.8.4 (legacy): can’t initialize iptables table nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded. , error: exit status 3 DEBU[2022-06-06T15:58:33.922133280+08:00] /usr/sbin/iptables, [-t filter -C FORWARD -j DOCKER-ISOLATION] DEBU[2022-06-06T15:58:33.930217848+08:00] /usr/sbin/iptables, [-t nat -D PREROUTING -m addrtype —dst-type LOCAL -j DOCKER] DEBU[2022-06-06T15:58:33.938240581+08:00] /usr/sbin/iptables, [-t nat -D OUTPUT -m addrtype —dst-type LOCAL ! —dst 127.0.0.0/8 -j DOCKER] DEBU[2022-06-06T15:58:33.946407692+08:00] /usr/sbin/iptables, [-t nat -D OUTPUT -m addrtype —dst-type LOCAL -j DOCKER] DEBU[2022-06-06T15:58:33.954494010+08:00] /usr/sbin/iptables, [-t nat -D PREROUTING] DEBU[2022-06-06T15:58:33.962472701+08:00] /usr/sbin/iptables, [-t nat -D OUTPUT] DEBU[2022-06-06T15:58:33.971057487+08:00] /usr/sbin/iptables, [-t nat -F DOCKER] DEBU[2022-06-06T15:58:33.977972741+08:00] /usr/sbin/iptables, [-t nat -X DOCKER] DEBU[2022-06-06T15:58:33.984878953+08:00] /usr/sbin/iptables, [-t filter -F DOCKER] DEBU[2022-06-06T15:58:33.991684247+08:00] /usr/sbin/iptables, [-t filter -X DOCKER] DEBU[2022-06-06T15:58:33.998385706+08:00] /usr/sbin/iptables, [-t filter -F DOCKER-ISOLATION-STAGE-1] DEBU[2022-06-06T15:58:34.005031747+08:00] /usr/sbin/iptables, [-t filter -X DOCKER-ISOLATION-STAGE-1] DEBU[2022-06-06T15:58:34.011356657+08:00] /usr/sbin/iptables, [-t filter -F DOCKER-ISOLATION-STAGE-2] DEBU[2022-06-06T15:58:34.018127825+08:00] /usr/sbin/iptables, [-t filter -X DOCKER-ISOLATION-STAGE-2] DEBU[2022-06-06T15:58:34.025012162+08:00] /usr/sbin/iptables, [-t filter -F DOCKER-ISOLATION] DEBU[2022-06-06T15:58:34.031704871+08:00] /usr/sbin/iptables, [-t filter -X DOCKER-ISOLATION] DEBU[2022-06-06T15:58:34.038561791+08:00] /usr/sbin/iptables, [-t nat -n -L DOCKER] DEBU[2022-06-06T15:58:34.042700910+08:00] /usr/sbin/iptables, [-t nat -N DOCKER] DEBU[2022-06-06T15:58:34.049590788+08:00] daemon configured with a 15 seconds minimum shutdown timeout DEBU[2022-06-06T15:58:34.049626081+08:00] start clean shutdown of all containers with a 15 seconds timeout. DEBU[2022-06-06T15:58:34.049687332+08:00] found 0 orphan layers DEBU[2022-06-06T15:58:34.050016921+08:00] Cleaning up old mountid : start. INFO[2022-06-06T15:58:34.050104131+08:00] stopping event stream following graceful shutdown error=» » module=libcontainerd namespace=moby DEBU[2022-06-06T15:58:34.050301885+08:00] Cleaning up old mountid : done. failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.4 (legacy): can’t initialize iptables table nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Installation not working on Ubuntu 19.10 #8891

I’ve tried to install Docker on Ubuntu 19.04. I followed the directions, but I get the following errors:

apt update works correctly:

The text was updated successfully, but these errors were encountered:

Ubuntu 19.04 is not yet in the list of supported distros for Docker 18.09, but will be coming with Docker 19.03 (beta/release-candidates are available in the «test» channel)

Closing this issue because of the above, but feel free to continue the conversation

@thaJeztah Docker 19.03 has been released, but the installation instructions still yields an error:

Is there a workaround, or can we expect it to land soon?

@ruurtjan the original issue reported above was on Ubuntu 19.04 (although I see the title said «19.10»). Packages are available for ubuntu 19.04 «disco» now, but 19.10 not yet; I think it was released Yesterday; most likely will come with the next Docker release (but that’s still some time out).

In the meantime you can try installing the package for Ubuntu 19.04 on Ubuntu 19.10 (which likely will work, but not tested), and I’ll have a look if it can be added to the nightly builds.

You can install 19.04 and then docker, then update to 19.10

Is there a workaround, or can we expect it to land soon?

In the meantime you can try installing the package for Ubuntu 19.04 on Ubuntu 19.10 (which likely will work, but not tested), and I’ll have a look if it can be added to the nightly builds.

Jep, got hello-world running correctly on Ubuntu 19.10 ( eoan ) with the disco repo using:

In the meantime you can try installing the package for Ubuntu 19.04 on Ubuntu 19.10 (which likely will work, but not tested), and I’ll have a look if it can be added to the nightly builds.

Jep, got hello-world running correctly on Ubuntu 19.10 ( eoan ) with the disco repo using:

This worked for me, thanks

In the meantime you can try installing the package for Ubuntu 19.04 on Ubuntu 19.10 (which likely will work, but not tested), and I’ll have a look if it can be added to the nightly builds.

Jep, got hello-world running correctly on Ubuntu 19.10 ( eoan ) with the disco repo using:

Did not worked for me.

I’ve got the following

Add the «disco» repository, and install docker

Verify the install

Add the «disco» repository, and install docker

Verify the install

Yes! I really missed a step on the installation steps. Thanks for your help!

@rivajunior
Thank you I was able to finally install Docker-CE on Ubuntu / POP_OS 19.10.

@rivajunior
Worked for me as well on my Ubuntu 19.10, Thank you!

This issue should remain open. Problem still persists.

This worked for me!

Unfortunately, I followed the exact steps on Ubuntu Budgie 19.10 and keep getting the same error. Completely removed Docker and tried again 3 times. Same result:

I managed to get the latest release of Docker running on my Kubuntu 19.10 install just by going to snapcraft.io and installing the snap. That easy.

I managed to get the latest release of Docker running on my Kubuntu 19.10 install just by going to snapcraft.io and installing the snap. That easy.

Easy but performance will suffer. Snap packages start up a bit slower. Source (page 2 with Chromium browser as an example).

There should be a way to install the right version that works on 19.10..

I tried installing via Snap, also does not work!

I’m having problems to install Docker on Ubunbtu 19.10

I’m using this script:

sudo ./docker-config.sh 1.25.4

@thaJeztah
I am unable to install also on 19.10, please see #10347 (comment) 😞
PS: re-open this issue as it is not fixed yet.

Hi @TriMoon! There should now be Ubuntu 19.10 packages up. Do you still have this problem?

@chris-crone ill try again later and update this reply. (Currently busy with other important stuff)

Hi @chris-crone, Still facing this problem.

sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists. Done
Building dependency tree
Reading state information. Done
The following NEW packages will be installed:
containerd.io docker-ce docker-ce-cli
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/85.6 MB of archives.
After this operation, 384 MB of additional disk space will be used.
Selecting previously unselected package containerd.io.
(Reading database . 263084 files and directories currently installed.)
Preparing to unpack . /containerd.io_1.2.13-1_amd64.deb .
Unpacking containerd.io (1.2.13-1) .
Selecting previously unselected package docker-ce-cli.
Preparing to unpack . /docker-ce-cli_5%3a19.03.8 3-0 ubuntu-eoan_amd64.deb .
Unpacking docker-ce-cli (5:19.03.8 3-0 ubuntu-eoan) .
Selecting previously unselected package docker-ce.
Preparing to unpack . /docker-ce_5%3a19.03.8 3-0 ubuntu-eoan_amd64.deb .
Unpacking docker-ce (5:19.03.8 3-0 ubuntu-eoan) .
Setting up containerd.io (1.2.13-1) .
Setting up docker-ce-cli (5:19.03.8 3-0 ubuntu-eoan) .
Setting up docker-ce (5:19.03.8 3-0 ubuntu-eoan) .
Job for docker.service failed because the control process exited with error code.
See «systemctl status docker.service» and «journalctl -xe» for details.
invoke-rc.d: initscript docker, action «start» failed.
● docker.service — Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2020-04-07 22:01:31 EDT; 8ms ago
Docs: https://docs.docker.com
Process: 15790 ExecStart=/usr/bin/dockerd -H fd:// —containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 15790 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (—configure):
installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.7-3) .
Processing triggers for systemd (242-7ubuntu3.2pop1 1575565723 19.10

6a5852b) .
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

Nvm got it working. Seems like I had not installed some new os updates. After getting those, rebooting and reinstalling, it installed without any hiccups

Worked for me with
sudo snap install docker

The snap packages won’t install the official packages, and I’ve seen some issues reported when running those, so I would not currently recommend running those.

Источник

I try to install Docker to Ubuntu 18.04.

I use this guide:
https://docs.docker.com/install/linux/docker-ce/ubuntu/

At the first time, I passed all steps and got error on last, attempting to install docker-ce:

# apt-get install docker-ce docker-ce-cli containerd.io

than, installation crushed with error. After that, I tried to install docker once more from the first step:

$ sudo apt-get remove docker docker-engine docker.io containerd runc

and got this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
Package 'containerd' is not installed, so not removed
Package 'docker' is not installed, so not removed
Package 'docker.io' is not installed, so not removed
Package 'runc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up docker-ce (5:18.09.5~3-0~ubuntu-bionic) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/dockerd-ce because link group dockerd is broken
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2019-04-12 13:52:26 MSK; 11ms ago
     Docs: https://docs.docker.com
  Process: 1884 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 1884 (code=exited, status=1/FAILURE)

Apr 12 13:52:26 n0ykp.vps.myjino.ru systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 12 13:52:26 n0ykp.vps.myjino.ru systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 12 13:52:26 n0ykp.vps.myjino.ru systemd[1]: Failed to start Docker Application Container Engine.
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please help me to solve problem and install docker.

UPD. After

apt purge docker docker-ce docker-engine docker.io containerd runc

:

root@ovz1:~# dpkg -i /home/xpendence/downloads/docker-ce_18.09.5_3-0_ubuntu-bionic_amd64.deb 
Selecting previously unselected package docker-ce.
(Reading database ... 33991 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.09.5_3-0_ubuntu-bionic_amd64.deb ...
Unpacking docker-ce (5:18.09.5~3-0~ubuntu-bionic) ...
Setting up docker-ce (5:18.09.5~3-0~ubuntu-bionic) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2019-04-12 15:27:23 MSK; 11ms ago
     Docs: https://docs.docker.com
  Process: 3938 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 3938 (code=exited, status=1/FAILURE)

Apr 12 15:27:23 n0ykp.vps.myjino.ru systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 12 15:27:23 n0ykp.vps.myjino.ru systemd[1]: Failed to start Docker Application Container Engine.
dpkg: error processing package docker-ce (--install):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (237-3ubuntu10.11) ...
Errors were encountered while processing:
 docker-ce

The package’s .preinst script is failing for some reason.

To find out why, examine the script in /var/lib/dpkg/info/PACKAGENAME.preinst

If you want to see exactly which line the script is failing on, edit the .preinst script and add set -x immediately after the #! line. This turns on execution tracing in the script.

NOTE: This assumes that the .preinst script is a shell script (either posix sh or bash). Almost all .preinst (and .postinst, .prerm, and .postrm) scripts are shell scripts but they don’t have to be, they could be any executable. e.g. on my main desktop machine with 9104 packages installed, 14 are perl scripts, 1 is a compiled executable (bash’s preinst — it can’t assume there is a functioning shell already installed), and all of the rest are shell scripts…9041 are POSIX shell scripts, 63 are bash scripts. If the .preinst is perl or python or something else, you’ll have to figure out how to enable debugging or execution trace mode or similar in that language.

Then run dpkg --configure --pending.

This will cause dpkg to try to configure the half-installed package. DO NOT reinstall it with dpkg -i, that will overwrite your edited .preinst script with the version in the .deb package.

This may give you enough information to fix the problem. It may be something simple like an unexpected or uncaught exit code from a program (most .preinst etc scripts have set -e, to make them terminate on the first error), or assuming that a directory already exists (and this may be due to an undeclared dependency in the package’s debian/control file — i.e it should depend on foo but doesn’t. just install foo anyway)

Once it’s fixed, run dpkg --configure --pending again, and the package should be properly installed.

If the .preinst script is buggy, there’s a reasonable chance that the .postinst (and/or .prerm and .postrm) scripts will be too. You may need to fix them as well.

Don’t forget to submit a bug report to whoever made the package so they can fix it.

@amitkumarj441
root@instance-4u1z1xql:# docker
The program ‘docker’ is currently not installed. You can install it by typing:
apt install docker.io
root@instance-4u1z1xql:# apt remove docker docker-engine

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
Package 'docker' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic sbsigntool
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded.

root@instance-4u1z1xql:# apt install apt-transport-https cat
catch catcodec catdoc catdvi catfish catkin
root@instance-4u1z1xql:# apt install apt-transport-https ca-certificates curl software-properties-common

Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
apt-transport-https is already the newest version (1.2.20).
curl is already the newest version (7.47.0-1ubuntu2.2).
software-properties-common is already the newest version (0.96.20.7).
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic sbsigntool
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded.

root@instance-4u1z1xql:# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key ad
d —
OK
root@instance-4u1z1xql:# apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22

root@instance-4u1z1xql:# add-apt-repository «deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable»
root@instance-4u1z1xql:# lsb_release -cs
xenial
root@instance-4u1z1xql:~# apt update

Hit:1 http://mirrors.baidubce.com/ubuntu xenial InRelease
Hit:2 http://mirrors.baidubce.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.baidubce.com/ubuntu xenial-security InRelease
Hit:4 https://download.docker.com/linux/ubuntu xenial InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
94 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@instance-4u1z1xql:~# apt install docker-ce

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic sbsigntool
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  docker-ce
0 upgraded, 1 newly installed, 0 to remove and 94 not upgraded.
Need to get 0 B/19.3 MB of archives.
After this operation, 89.0 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 114802 files and directories currently installed.)
Preparing to unpack .../docker-ce_17.03.1~ce-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-ce (17.03.1~ce-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu13) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up docker-ce (17.03.1~ce-0~ubuntu-xenial) ...
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@instance-4u1z1xql:~# journalctl -xe

Jun 15 19:33:09 instance-4u1z1xql dockerd[13028]: time="2017-06-
15T19:33:09.802502692+08:00" level=info msg="libcontainerd: new containerd process, pid: 13037"
Jun 15 19:33:10 instance-4u1z1xql kernel: libcrc32c: disagrees about version of symbol module_layout
Jun 15 19:33:10 instance-4u1z1xql kernel: device-mapper: table: 252:0: thin-pool: unknown target type
Jun 15 19:33:10 instance-4u1z1xql kernel: device-mapper: ioctl: error adding target to table
Jun 15 19:33:10 instance-4u1z1xql dockerd[13028]: time="2017-06-15T19:33:10.891982725+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: devicemJun 15 19:33:10 instance-4u1z1xql dockerd[13028]: Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run faJun 15 19:33:10 instance-4u1z1xql systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 15 19:33:10 instance-4u1z1xql systemd[1]: Failed to start Docker Application Container Engine.

So I have docker installed on Linux Mint 18.3 (dual-boot with Windows 7) and I can run and work with the containers without an issue. However, ever since I installed it, I keep getting errors while I try to upgrade my packages.

Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) …
addgroup: The group `docker’ already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (—configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to install docker.io again and see what happens:

$ sudo apt-get install docker.io
Reading package lists… Done
Building dependency tree
Reading state information… Done
docker.io is already the newest version (1.13.1-0ubuntu1~16.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) …
addgroup: The group `docker’ already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (—configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running $ groups returns this:

$ groups
kosara adm dialout cdrom sudo dip plugdev lpadmin sambashare docker

I did some digging and ran $ sudo dpkg --configure -a:

$ sudo dpkg —configure -a
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) …
addgroup: The group `docker’ already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (—configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io

But it seems that a package that isn’t fully installed is to blame, so I tried to fix it:

$ sudo apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) …
addgroup: The group `docker’ already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (—configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

I removed docker and did a clean install, to no avail. I’m not really sure what to try next and I couldn’t find a solution that works for me so far. Any help would be welcome!


While upgrading an Ubuntu 18.04 machine (and preparing for 20.04 dist upgrade), the upgrade process failed at the docker.io package with the following error:

Selecting previously unselected package docker.io.
(Reading database … 173993 files and directories currently installed.)
Preparing to unpack …/docker.io_20.10.7-0ubuntu5~18.04.3_amd64.deb …
The aufs storage-driver is no longer supported.
Please ensure that none of your containers are
using the aufs storage driver, remove the directory
/var/lib/docker/aufs and try again.

dpkg: error processing archive /var/cache/apt/archives/docker.io_20.10.7-0ubuntu5~18.04.3_amd64.deb (—unpack):
 new docker.io package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/docker.io_20.10.7-0ubuntu5~18.04.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

As this particular machine is part of a Kubernetes cluster from 2018, back then «aufs» was the default storage driver for the Docker engine. overlay and overlay2 followed after aufs, but a storage driver migration never happened.

Fixing the stuck upgrade

Obviously the apt dist-upgrade process is stuck at this point. At this point, the docker.io package was removed and a manual
installation of docker.io was attempted. But this resulted in — again —
the same error as the upgrade package. 

Next attempt: Doing what the error message implies but do a backup before. An additional disk was attached to this machine, formatted and mounted at /mnt:

root@node1:~# systemctl stop docker
root@node1:~# mount /dev/sdc1 /mnt
root@node1:~# cp -au /var/lib/docker /mnt/docker.bk

Now let’s remove the aufs directory:

root@node1:~# rm -rf /var/lib/docker/aufs/
rm: cannot remove ‘/var/lib/docker/aufs/mnt/7c5f34b4819b30c20893e46ea72bfb1e776ccc157847bc862e604edecbc7f717’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/a00586d3ef52026693f2602c29bd310f2447bab14162127946e78eb05dcf6e13’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/391e1c7bfd9a3dd83f4d5efecd16359d26f1c9ec14a710aac2d53be90215f667’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/a00ebceab4eb3d06678ed11b86807bd8adac0fd0d8536b399264785ead99981d’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/cc8a4f3e00de7293e11c3da9bdb16552144439f7e33178fcdacb70a83cb38b4c’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/f04fd3244cb8b01b2c27e63840ed72e5207cab6b41430f63a8d51411ac7d4782’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/d2b9fd29d5e32fd6935ad64928840f55787aee5c8dfc66f8793125129f8bb27e’: Is a directory
rm: cannot remove ‘/var/lib/docker/aufs/mnt/881eac79990a998ea0bf25c9c2257201a45364f61cb6a557d87ca6a1ae7db0df’: Is a directory

Even though the Docker service was stopped and the aufs directory checked with lsof (which was unable to stat these directories, as it actually needs Docker to be running), certain directories could not be removed. The machine required a reboot to fully «release» these aufs mounted directories:

root@node1:~# reboot
root@node1:~# rm -rf /var/lib/docker/aufs/

This time it worked.

Before installing the docker.io package again, let’s make sure that overlay2 will be used as storage-driver. This can be added in the /etc/docker/daemon.json file:

root@node1:~# cat /etc/docker/daemon.json
{
  «log-driver»: «json-file»,
  «log-opts»: {
    «max-size»: «100m»,
    «max-file»: «5»
  },
  «storage-driver»: «overlay2»
}

Install docker.io again:

root@node1:~# apt-get install docker.io

This worked without any error. Let’s check the currently used storage driver of the Docker engine:

root@node1:~# docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
[…]

This looks fine — but what about the containers which are supposed to be running on this machine? The Docker service is now running but without any containers. The node therefore is unaware that it is part of a Kubernetes cluster. In the Kubernetes overview this machine (cluster node) is seen as unavailable.

There is no aufs to overlay migration strategy!

The official Docker overlayfs documentation just mentions how to (manually) define overlay or overlay2 as storage driver in the Docker engine. However there are no words how to migrate containers from aufs to overlay/2. Even with a backup of the containers available (in /mnt/docker.bk), there is no (documented) way to migrate the aufs containers to overlayfs.

Did this catch me on the wrong foot? — Definitely.

Am I the only one? — Not at all. Ubuntu bug #1939106 is exactly about this package upgrade problem.

Does it makes sense to switch to overlayfs? — Yes, not only from a performance point of view. Actually, if the affected machine wouldn’t have been in use in a Kubernetes cluster since 2018, the newer overlayfs driver would have been the default (seen by doing OS upgrades on other/newer clusters without any problems).

What do others do in this situation? — Some hint to save the images and load them back in after switching to overlayfs, but this only works for images but not for the containers (and data). Others have their containers (manually) setup using a docker-compose configuration. This makes sure to pull the required images again. But here we are in a Kubernetes cluster situation. The node is supposed to connect back to the cluster and retrieve instructions from the kube-api. But it won’t do, because a kubelet container is not running.

The Kubernetes way: Remove node and add back to cluster again

While evaluating different scenarios, including an image and container backup, described in this excellent article by William Meleyal, I finally decided to go with the typical cluster approach: Remove the node from the cluster, reset it and add it back to the cluster.

As this machine is part of the «local» cluster of a Rancher managed Kubernetes cluster (this means that Rancher itself runs on this cluster), RKE needs to be used to remove the cluster node. The cluster yaml was adjusted, disabling the machine in question by commenting it, and then rke up was run:

ck@mgmt:~/rancher$ ./rke_linux-amd64-1.3.1 up —config 3-node-rancher-n111.yml
[…]
INFO[0036] [remove/etcd] Removing member [etcd-192.168.253.15] from etcd cluster
INFO[0037] [remove/etcd] Checking etcd cluster health on [etcd-192.168.253.16] after removing [etcd-192.168.253.15]
INFO[0038] [etcd] etcd host [192.168.253.16] reported healthy=true
INFO[0038] [remove/etcd] etcd cluster health is healthy on [etcd-192.168.253.16] after removing [etcd-192.168.253.15]
INFO[0038] [remove/etcd] Successfully removed member [etcd-192.168.253.15] from etcd cluster
INFO[0038] [hosts] host [192.168.253.15] has another role, skipping delete from kubernetes cluster
INFO[0038] [dialer] Setup tunnel for host [192.168.253.15]
INFO[0054] [dialer] Setup tunnel for host [192.168.253.15]
INFO[0059] [dialer] Setup tunnel for host [192.168.253.15]
WARN[0063] [reconcile] Couldn’t clean up etcd node [192.168.253.15]: Not able to reach the host: Can’t retrieve Docker Info: error during connect: Get «http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info»: Unable to access the service on /var/run/docker.sock. The service might be still starting up. Error: ssh: rejected: connect failed (open failed)
INFO[0063] [reconcile] Check etcd hosts to be added     
INFO[0063] [hosts] host [192.168.253.15] has another role, skipping delete from kubernetes cluster
INFO[0063] [dialer] Setup tunnel for host [192.168.253.15]
INFO[0068] [dialer] Setup tunnel for host [192.168.253.15]
INFO[0073] [dialer] Setup tunnel for host [192.168.253.15]
WARN[0077] [reconcile] Couldn’t clean up worker node [192.168.253.15]: Not able to reach the host: Can’t retrieve Docker Info: error during connect: Get «http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info»: Unable to access the service on /var/run/docker.sock. The service might be still starting up. Error: ssh: rejected: connect failed (open failed)
INFO[0077] [hosts] Cordoning host [192.168.253.15]      
INFO[0077] [hosts] Deleting host [192.168.253.15] from the cluster
INFO[0077] [hosts] Successfully deleted host [192.168.253.15] from the cluster

[…]
INFO[0327] Finished building Kubernetes cluster successfully 

After rke finished, only two nodes remained in the cluster. 

Now our cluster node can be properly reset and cleaned up to be added back into the cluster.

Once this is done, the cluster yaml is adjusted again, this time enabling our problematic machine again. Followed by another rke run:

ck@mgmt:~/rancher$ ./rke_linux-amd64-1.3.1 up —config 3-node-rancher-n111.yml
INFO[0000] Running RKE version: v1.3.1                  
INFO[0000] Initiating Kubernetes cluster                
[…]
INFO[0036] [reconcile] Reconciling cluster state        
INFO[0036] [reconcile] Check etcd hosts to be deleted   
INFO[0036] [reconcile] Check etcd hosts to be added     
INFO[0038] [add/etcd] Adding member [etcd-192.168.253.15] to etcd cluster
INFO[0039] [add/etcd] Successfully Added member [etcd-192.168.253.15] to etcd cluster

[…]
INFO[0090] Pre-pulling kubernetes images                
INFO[0090] Pulling image [rancher/hyperkube:v1.20.11-rancher1] on host [192.168.253.15], try #1
[…]
INFO[0214] Starting container [kube-apiserver] on host [192.168.253.15], try #1
INFO[0215] [controlplane] Successfully started [kube-apiserver] container on host [192.168.253.15]
INFO[0215] [healthcheck] Start Healthcheck on service [kube-apiserver] on host [192.168.253.15]
INFO[0225] [healthcheck] service [kube-apiserver] on host [192.168.253.15] is healthy
[…]
INFO[0370] Finished building Kubernetes cluster successfully 

A few seconds after rke finished, our node1 appeared in the «local» cluster again.

TL;DR: From aufs to overlayfs in a Kubernetes cluster

When you need to migrate from aufs to overlayfs (obviously required if you still use aufs and installing Docker 20.10.x) and this machine is part of a Kubernetes cluster, use the following steps:

  • Drain the cluster node
  • Remove the node from the cluster
  • Run a full Rancher reset/clean up on this node
  • Make sure docker info shows overlay2 as storage driver, if it doesn’t adjust /etc/docker/daemon.json and restart Docker
  • Optional: Now upgrade the docker.io package or the full OS (apt dist-upgrade)
  • Add the node back to the cluster

Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

Понравилась статья? Поделить с друзьями:
  • New cpu inserted in your system как исправить
  • New connection error python
  • New coil aegis boost ошибка
  • New chromium browser package pre installation script subprocess returned error exit status 10
  • New aksusbd i386 package pre installation script subprocess returned error exit status 8