Docker: "Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39

Problem

  • An error response related to the maximum supported API version is received from the Docker daemon upon running any CLI commands, e.g.
Copy
  • The docker-ce package has an internal dependency on docker-ce-cli but the dependent package version is not locked. The latest version of the CLI gets installed implicitly as part of this dependency. However, on May 15th, 2020, a new version of the CLI was released that broke compatibility with the docker-ce 18.09.9 version.

Note:This issue is likely to have impacted any nodes added between May 15th, 2020 and May 28th, 2020. Verify your Docker CLI version is impacted before proceeding with resolution steps. These steps may not be effective in resolving issues encountered with other versions of the client.

Copy

Environment

  • Platform9 Managed Kubernetes - All Versions
  • Docker Client v19.03.9

Cause

docker-ce-cli(client) v19.03.9 fails to downgrade its API version to match the server, as recognized in docker/cli#2533. This has now been rectified with the latest release pushed out May 29th, 2020, Docker Client v19.03.10.

Resolution

As mentioned above, Docker has pushed a release with a fix. Please use the steps below to ensure you have the latest release.

Ubuntu

  1. Run the following command to update the package metadata.
Copy
  1. Setup the Docker repository.

    • Setup apt utilities.
Bash
Copy
  • Download Docker GPG key.
Bash
Copy
  • Add Docker repository to your host.
Bash
Copy
  1. Install the latest version of docker-ce-cli.
Copy

CentOS

  1. Setup the Docker repository.

    • Add yum-utils.
Bash
Copy

- Add Docker repository to your host.

Bash
Copy

Note: CentOS may ask you to accept the GPG key for this repository when you install something from the repository in the next step.

  1. Install the latest version of docker-ce-cli.
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard