Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Docker 25+ error 'API error (400): client version 1.18 is too old.' #4002

Open
misha-rollun opened this issue Jan 30, 2024 · 7 comments
Open

Comments

@misha-rollun
Copy link

misha-rollun commented Jan 30, 2024

What happened?

After updating docker engine i got error:

unable to connect to docker: API error (400): client version 1.18 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

How to reproduce it?

Install docker engine version 25+ (where minimum api version higher than 1.18)

$ docker version
Client: Docker Engine - Community
 Version:           25.0.1
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Tue Jan 23 23:11:25 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.1
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       71fa3ab
  Built:            Tue Jan 23 23:09:52 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.27
  GitCommit:        a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc:
  Version:          1.1.11
  GitCommit:        v1.1.11-0-g4bccb38
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

And launch weave

weave launch

Versions:

$ weave version
weave script 2.8.1
weave 2.8.1
$ uname -a
Linux fedora 6.6.13-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 17:28:45 UTC 2024 x86_64 GNU/Linux
@Lathrox
Copy link

Lathrox commented Jan 31, 2024

Background

In docker version 25.0 they have changed the minimum supported api version from 1.12 to 1.24.
Weave only supports docker has are dependent on docker api 1.18.

Fix for Docker version 25.0

Create file: /etc/systemd/system/docker.service.d/min-api-version.conf

[Service]
Environment="DOCKER_MIN_API_VERSION=1.18"

systemctl daemon-reload

IMPORTANT

Support for API versions lower than 1.24 will be permanently removed in Docker Engine v26, and the minimum supported API version will be incrementally raised in releases following that.

Information sourced from: https://docs.docker.com/engine/deprecated/#deprecate-legacy-api-versions

@misha-rollun
Copy link
Author

Fix for Docker version 25.0

Create file: /etc/systemd/system/docker.service.d/min-api-version.conf

[Service]
Environment="DOCKER_MIN_API_VERSION=1.18"

systemctl daemon-reload

After daemon-reload also run systemctl restart docker to apply changes.

@Lathrox
Copy link

Lathrox commented Feb 13, 2024

Fix for Docker version 25.0

Create file: /etc/systemd/system/docker.service.d/min-api-version.conf

[Service]
Environment="DOCKER_MIN_API_VERSION=1.18"

systemctl daemon-reload

After daemon-reload also run systemctl restart docker to apply changes.

restart of docker isn't necessary. It will sort it out itself but will take longer for it to handle it.

@misha-rollun
Copy link
Author

Fix for Docker version 25.0

Create file: /etc/systemd/system/docker.service.d/min-api-version.conf

[Service]
Environment="DOCKER_MIN_API_VERSION=1.18"

systemctl daemon-reload

After daemon-reload also run systemctl restart docker to apply changes.

restart of docker isn't necessary. It will sort it out itself but will take longer for it to handle it.

Maybe, but i spent some time figuring out why it's not working. And this reccomendation is from docker docs: https://docs.docker.com/config/daemon/systemd/ (4th point)

@Lathrox
Copy link

Lathrox commented Mar 14, 2024

Some great work from @rajch This will resolve weave for docker v26.0
e500408

@misha-rollun
Copy link
Author

Some great work from @rajch This will resolve weave for docker v26.0 e500408

And how i can apply this fix? Are you planning to make a new release?

@Lathrox
Copy link

Lathrox commented Mar 25, 2024

There is an active pull requests that has been worked ongoing since August 2023. But unsure if it will ever be merged.
Link to pull requests: #3996

Unsure if this is going to be maintained in the future. But there is a fork of this that is being maintained.
https://github.com/rajch/weave/releases/tag/v2.8.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants