2

I have Ubuntu 20.04 VM with installed latest docker_compose, after the last VM update and restart all the docker's data is missing.

$ docker container ls
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
$ docker ps -all
CONTAINER ID   IMAGE          COMMAND    CREATED       STATUS    PORTS     NAMES
~$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.0-docker)

Server: Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 1 Server Version: 19.03.11 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs 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: runc Default Runtime: runc Init Binary: docker-init containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc version: init version: fec3683 Security Options: apparmor seccomp Profile: default Kernel Version: 5.4.0-58-generic Operating System: Ubuntu Core 16 OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 2.922GiB Name: ubuntu-vm ID: 672D:62WJ:EI7V:KCSA:CO4S:UMZG:MHOR:LA3D:UIYJ:J7OZ:G4ID:PYED Docker Root Dir: /var/snap/docker/common/var-lib-docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

WARNING: No swap limit support

I can't be sure, but is the data directory been changed due to the latest update? I paid attention that Docker Root Dir: now is /var/snap/docker/common/var-lib-docker - can't be sure what it was before...

$ sudo du -hs /var/snap/docker/common/var-lib-docker
644K    /var/snap/docker/common/var-lib-docker

This directory almost empty (644K) rather than the old one (7.5G) /var/lib/docker/ directory

~$ sudo du -hs /var/lib/docker/
du: cannot access '/var/lib/docker/overlay2/407d225866adecc74197895905e4bb690e13c2266257ce97c2eb633b38f8b0b4-init': No such file or directory
du: cannot access '/var/lib/docker/overlay2/3b2c4e3d15bcedc8a98a369b2d43fd8b3640ee885b486ba7cce9ad527152f07b': No such file or directory
du: cannot access '/var/lib/docker/overlay2/3b2c4e3d15bcedc8a98a369b2d43fd8b3640ee885b486ba7cce9ad527152f07b-init': No such file or directory
du: cannot access '/var/lib/docker/overlay2/407d225866adecc74197895905e4bb690e13c2266257ce97c2eb633b38f8b0b4': No such file or directory
7.5G    /var/lib/docker/

I tried to stop the docker service and replace the contents of /var/snap/docker/common/var-lib-docker/ with data from /var/lib/docker/ but the results are the same empty responses on docker ps -all and others

$ docker ps -a
CONTAINER ID   IMAGE          COMMAND    CREATED       STATUS                   PORTS     NAMES
2bb80650b7ee   bf756fb1ae65   "/hello"   2 hours ago   Exited (0) 2 hours ago             great_germain

I have this /hello image after docker_compose reinstall (Docker problems in Ubuntu 20.04), where all the others?

~$ docker version
Client: Docker Engine - Community
 Version:           20.10.1
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        831ebea
 Built:             Tue Dec 15 04:34:58 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Engine: Version: 19.03.11 API version: 1.40 (minimum version 1.12) Go version: go1.13.12 Git commit: 77e06fd Built: Mon Jun 8 20:24:59 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: docker-init: Version: 0.18.0 GitCommit: fec3683

Here the error log:

~$ journalctl -fu docker
Dec 24 23:55:18 ubuntu-vm dockerd[967363]: time="2020-12-24T23:55:18Z" level=info msg="Firewalld: docker zone already exists, returning"
Dec 24 23:55:19 ubuntu-vm dockerd[965644]: time="2020-12-24T23:55:19.666542395Z" level=info msg="ignoring event" container=b2ce232b32e6f222a9708dcb0cb42436c8e39ed2f42c3b0e41788b60464ef94e module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Dec 24 23:55:19 ubuntu-vm dockerd[967407]: time="2020-12-24T23:55:19Z" level=info msg="Firewalld: docker zone already exists, returning"
Dec 24 23:55:20 ubuntu-vm dockerd[967430]: time="2020-12-24T23:55:20Z" level=info msg="Firewalld: docker zone already exists, returning"
Dec 24 23:55:21 ubuntu-vm dockerd[965644]: time="2020-12-24T23:55:21.948192301Z" level=error msg="fatal task error" error="task: non-zero exit (1)" module=node/agent/taskmanager node.id=rzo0jf8l0didecmsq81fbtfho service.id=k8l1kf98uz1gmg7ikb7fahlqy task.id=bve3fgzk41viovoqsw3j257ak
Dec 24 23:55:22 ubuntu-vm dockerd[965644]: time="2020-12-24T23:55:22.310344889Z" level=warning msg="failed to deactivate service binding for container portainer_agent.rzo0jf8l0didecmsq81fbtfho.ulqtkmouxn7edqts3bbl2udde" error="No such container: portainer_agent.rzo0jf8l0didecmsq81fbtfho.ulqtkmouxn7edqts3bbl2udde" module=node/agent node.id=rzo0jf8l0didecmsq81fbtfho

How to restore containers data to the previous state and get rid of this error: level=error msg="fatal task error" error="task: non-zero exit (1)" module=node/agent/taskmanager?

0 Answers0