compose-cli icon indicating copy to clipboard operation
compose-cli copied to clipboard

cannot get container group client: not logged in to azure, you need to run "docker login azure" first: access token request failed. Maybe you need to login to azure again. i/o timeout

Open glauber-md opened this issue 6 years ago • 2 comments

Description

Using "Docker Desktop, Version 2.4.2.0 Channel edge" as per https://docs.docker.com/engine/context/aci-integration/. All setup was done and works properly, but sometimes I get a cannot get container group client: not logged in to azure error, preventing me from updating my containers on ACI. Running docker login azure does not help, as the issue seems to be related to this process.

Steps to reproduce the issue:

  1. docker context use my-aci
  2. docker compose up -f docker-compose.yml

Describe the results you received:

The following error message is shown:

cannot get container group client: not logged in to azure, you need to run "docker login azure" first: access token request failed. Maybe you need to login to azure again.: Post "https://login.microsoftonline.com/b1d02909-0d83-412c-bebe-d504ceeb89ca/oauth2/v2.0/token": dial tcp: lookup login.microsoftonline.com on 10.95.2.40:53: read udp 192.168.15.18:62684->10.95.2.40:53: i/o timeout

Describe the results you expected:

Deploy the updated container image to ACI.

Additional information you deem important (e.g. issue happens only occasionally):

I reported the problem to Microsoft Support but they answered this integration is not supported by them. This issue happens only occasionally but impacts our business.

Output of docker version:

Client: Docker Engine - Community
 Cloud integration: 0.1.22
 Version:           20.10.0-beta1
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        ac365d7
 Built:             Tue Oct 13 18:13:53 2020
 OS/Arch:           darwin/amd64
 Context:           sescsp-aci-hml
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.0-beta1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       9c15e82
  Built:            Tue Oct 13 18:17:18 2020
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.4.1
  GitCommit:        c623d1b36f09f8ef6536a057bd658b3aa8632828
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.

[
    {
        "Name": "my-aci",
        "Metadata": {
            "Description": "...@eastus",
            "Type": "aci"
        },
        "Endpoints": {
            "aci": {
                "Location": "eastus",
                "ResourceGroup": "...",
                "SubscriptionID": "..."
            },
            "docker": {
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/Users/glaubermd/.docker/contexts/meta/c0f40ebdc619464ec7d177b46a307cb6d5349a37d0629cad863511bf3eaa81e9",
            "TLSPath": "/Users/glaubermd/.docker/contexts/tls/c0f40ebdc619464ec7d177b46a307cb6d5349a37d0629cad863511bf3eaa81e9"
        }
    }
]

Output of docker info:

Command "info" not available in current context (my-aci), you can use the "default" context to run this command

Additional environment details (AWS ECS, Azure ACI, local, etc.):

Azure ACI.

Running compose cli on MacOS 10.15.7.

glauber-md avatar Nov 18 '20 15:11 glauber-md

Hi @glauber-md, Most ACI commands from the cli are connecting to Azure services, and one of the first step is to check if you have a security token recent enough, otherwise the cli refreshes this token (this happens transparently).

Here during the token renewal call, you seem to have a networking issue to connect to Microsoft, in your error message: lookup login.microsoftonline.com on 10.95.2.40:53: read udp 192.168.15.18:62684->10.95.2.40:53: i/o timeout

You'll need to find out why your network is not able to connect to Microsoft servers from time to time

gtardif avatar Nov 20 '20 08:11 gtardif

Feel free to reopen if this still happens and seems related to compose-cli rather than a networking issue with Microsoft servers

gtardif avatar Feb 10 '21 11:02 gtardif