lrouter
lrouter

Reputation: 379

Could not find "AddResource" method when pulling docker images

I am pulling a docker image from docker hub. But it accounts a error. It says that "AddResource" method could not be found:

docker: error adding content digest to lease: sha256:31168c113862cce4cef6b16b20cdef1b126eb755492a6030ca68a9020b7eb657: unknown method AddResource: not implemented.

I have tried some times, and tried to pull different images. The error is the same. The docker version is:

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

Server: Docker Engine - Community
 Engine:
  Version:          20.10.1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       f001486
  Built:            Tue Dec 15 04:32:40 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.4
  GitCommit:        e6b3f5632f50dbc4e9cb6288d911bf4f5e95b18e
 runc:
  Version:          1.2.4
  GitCommit:        6635b4f0c6af3810594d2770f662f34ddc15b40d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Upvotes: 1

Views: 3951

Answers (4)

Rea Haas
Rea Haas

Reputation: 2528

For Ubuntu users: (same as @hhadi answer)

sudo apt install containerd

This solved the issue for me :)

Upvotes: 0

bugger producer
bugger producer

Reputation: 1

I meet the same problem when pulling an image on an arm machine and pull the image successfully after reinstalling the docker using the solution upstairs.

sudo systemctl stop docker
sudo dpkg -r docker.io
sudo dpkg -i (containerd, docker-ce-cli, docker-ce that have the same version)

Upvotes: 0

hhadi
hhadi

Reputation: 121

For me it turned out that due to a bug in containerd, I hadn't updated it for a while. So updating the containerd using

sudo pacman -Sy containerd

and restarting both services

sudo systemctl restart containerd.service
sudo systemctl restart docker

fixed the issue. Now I have:

docker version               
Client:
 Version:           20.10.1
 API version:       1.41
 Go version:        go1.15.6
 Git commit:        831ebeae96
 Built:             Tue Dec 15 22:25:01 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.6
  Git commit:       f0014860c1
  Built:            Tue Dec 15 22:24:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b.m
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

and the issue is fixed

Upvotes: 2

A. Kanso
A. Kanso

Reputation: 11

I have seen this error when there is a mismatch between the docker-client version and the docker-server version. In your case, they seem to be the same, but, I would recommend re-installing them, if you're on ubuntu perform:

sudo apt-get remove docker-ce
sudo apt-get remove docker-ce-cli


sudo apt-get install docker-ce-cli=5:20.10.1~3-0~ubuntu-$(lsb_release -cs) --assume-yes 
sudo apt-get install docker-ce=5:20.10.1~3-0~ubuntu-$(lsb_release -cs) --assume-yes

Note: I have a newer containerD:

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

Server: Docker Engine - Community
 Engine:
  Version:          20.10.1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       f001486
  Built:            Tue Dec 15 04:32:40 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Upvotes: 0

Related Questions