Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error="Error response from daemon: client version 1.42 is too new #3036

Open
windofbarcelona opened this issue Nov 29, 2021 · 5 comments
Open

Comments

@windofbarcelona
Copy link

my docker version is:
`Client: Docker Engine - Community
Version: 20.10.10
API version: 1.41
Go version: go1.16.9
Git commit: b485636
Built: Mon Oct 25 07:42:59 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.10
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:41:08 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.11
GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
`

my swarmd version: swarmd github.com/docker/swarmkit v1.12.0-2276-g63033102.m

when my install swarmkit, there are no errors,but when i want to Initialize the first node by :
$ swarmd -d /tmp/node-1 --listen-control-api /tmp/node-1/swarm.sock --hostname node-1
there has been an error:
ERRO[0000] agent: node description unavailable agent="&{0xc0000f0180 0xc0001b6220 [] {0 0} <nil>}" error="Error response from daemon: client version 1.42 is too new. Maximum supported API version is 1.41" module=node/agent node.id=ynf1y34usrk32ch3r3znt0l6x

i try to export DOCKER_API_VERSION=1.41,but it doesn't work, and every service is rejected

what should i do....

@akerouanton
Copy link
Member

Hi @windofbarcelona,

Neither client.FromEnv nor client.NegotiateAPIVersion are used by swarmd when it initializes its API client, so setting DOCKER_API_VERSION won't help here.

Could you detail a bit what you're trying to do? It's a bit weird to see someone use swarmd directly.

@windofbarcelona
Copy link
Author

Hi @windofbarcelona,

Neither client.FromEnv nor client.NegotiateAPIVersion are used by swarmd when it initializes its API client, so setting DOCKER_API_VERSION won't help here.

Could you detail a bit what you're trying to do? It's a bit weird to see someone use swarmd directly.

I'm trying to change the scheduling policy of swarmkit,so i download the source code of the swarmkit.firstly, i run a example according to the README.md,and an error has occured

@akerouanton
Copy link
Member

In that case, you can add these two functions to the client options and submit a PR (although I don't know if it'd be accepted by maintainers).

@windofbarcelona
Copy link
Author

In that case, you can add these two functions to the client options and submit a PR (although I don't know if it'd be accepted by maintainers).

thank you,i solved this problem,i change the DefaultVersion in [common.go] (https://github.com/docker/swarmkit/blob/master/vendor/github.com/docker/docker/api/common.go) to 1.41,and then services is running

@thaJeztah
Copy link
Member

In that case, you can add these two functions to the client options and submit a PR (although I don't know if it'd be accepted by maintainers).

I think it would make sense to add options to make swarmd to perform version negotiation. I'm not a maintainer on this repository (officially), but happy to review a PR for that

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

No branches or pull requests

3 participants