Docker snap is stuck. Cannot use or remove

Bug #1834997 reported by Karl Stenerud on 2019-07-02
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker
New
Undecided
Unassigned
snapd
High
Unassigned
docker (Ubuntu)
Undecided
Tianon Gravi

Bug Description

The docker snap is completely stuck on my machine (ubuntu 18.04). I can't use it, and I can't remove it:

karl@tp-main:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

karl@tp-main:~$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.39.3 7270 stable canonical✓ core
core18 20190611 1013 stable canonical✓ base
docker 18.06.1-ce 372 stable canonical✓ -
gimp 2.10.12 189 stable snapcrafters -
gtk-common-themes 0.1-16-g2287c87 1198 stable canonical✓ -
lxd 3.14 10972 stable canonical✓ -
multipass 0.7.1 908 beta canonical✓ classic
sublime-text 3207 58 stable snapcrafters classic

karl@tp-main:~$ snap remove docker
error: cannot perform the following tasks:
- Stop snap "docker" services ([--root / is-enabled snap.docker.dockerd.service] failed with exit status 1: Failed to get unit file state for snap.docker.dockerd.service: No such file or directory
)
- Remove data for snap "docker" (372) (remove /var/snap/docker/common: device or resource busy)

karl@tp-main:~$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.39.3 7270 stable canonical✓ core
core18 20190611 1013 stable canonical✓ base
docker 18.06.1-ce 372 stable canonical✓ disabled
gimp 2.10.12 189 stable snapcrafters -
gtk-common-themes 0.1-16-g2287c87 1198 stable canonical✓ -
lxd 3.14 10972 stable canonical✓ -
multipass 0.7.1 908 beta canonical✓ classic
sublime-text 3207 58 stable snapcrafters classic

karl@tp-main:~$ docker ps
bash: /snap/bin/docker: No such file or directory

karl@tp-main:~$ sudo snap enable docker
docker enabled

karl@tp-main:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Rebooting doesn't help.

description: updated
Zygmunt Krynicki (zyga) wrote :

This bug seems to have two parts:

1) snapd cannot reliably remove a snap
2) docker snap doesn't work correctly

I'd like to split this bug so that only issue 1) is addressed here. Issue 2) was relayed to the maintainer of the snap. I expect him to update the bug report with appropriate tracking information for 2).

As such I'm marking this bug as triaged with the understanding that only 1) is tracked here.

Changed in snapd:
status: New → Triaged
importance: Undecided → High
Changed in docker (Ubuntu):
assignee: nobody → Tianon Gravi (tianon)
Tianon Gravi (tianon) wrote :

From the Docker perspective, it sounds like there's a process stuck somewhere. I'd recommend checking the system for any leftover "docker" processes (dockerd, containerd, shim processes, etc) via something like "ps faux | grep docker" (and/or "containerd", "runc", "shim", etc).

The "dockerd" service logs might also have some clues, and I believe "journalctl -u snap.docker.dockerd.service" is the right way to access those in Snappy?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers