Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

Az login "getaddrinfo" failed for api-dogfod.resources.windows-int.net #24820

Closed leeyun53 closed 1 year ago

leeyun53 commented 1 year ago

Related command

az cloud register --name Dogfood --endpoint-active-directory-graph-resource-id https://graph.ppe.windows.net/ \
         --endpoint-active-directory-resource-id https://management.core.windows.net/ \
         --endpoint-gallery https://df.gallery.azure-test.net/ \
         --endpoint-resource-manager https://api-dogfood.resources.windows-int.net/ \
         --endpoint-active-directory https://login.windows-ppe.net
az cloud set --name Dogfood
az login

Describe the bug <urllib3.connection.HTTPSConnection object at 0x04F97760>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

To Reproduce

az cloud register --name Dogfood --endpoint-active-directory-graph-resource-id https://graph.ppe.windows.net/ \
         --endpoint-active-directory-resource-id https://management.core.windows.net/ \
         --endpoint-gallery https://df.gallery.azure-test.net/ \
         --endpoint-resource-manager https://api-dogfood.resources.windows-int.net/ \
         --endpoint-active-directory https://login.windows-ppe.net
az cloud set --name Dogfood
az login

After the above cmdlets, login through the auto pop-up window (https://login.windows-ppe.net/organizations/oauth2/v2.0/authorize

Environment summary Shell type: Powershell (run as Admin) { "azure-cli": "2.41.0", "azure-cli-core": "2.41.0", "azure-cli-telemetry": "1.0.8", "extensions": { "connectedk8s": "1.3.4", "k8s-configuration": "1.6.0" } }

Additional context I am running az login after setting cloud to Dogfood environment. I've already checked my firewall and proxy settings. I have turned on Defender firewall, and proxy is off as well.

yonzhan commented 1 year ago

@jiasli for awareness

bebound commented 1 year ago

Plese attach the output of az login --debug. It is usually caused by network issue.

leeyun53 commented 1 year ago

@bebound @jiasli Here's the output of az login --debug

PS C:\WINDOWS\system32> az login --debug
cli.knack.cli: Command arguments: ['login', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03B682B0>, <function OutputProducer.on_global_arguments at 0x03C4F580>, <function CLIQuery.on_global_arguments at 0x03C6A1D8>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: profile                   0.003         2         9
cli.azure.cli.core: Total (1)                 0.003         2         9
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0
cli.azure.cli.core: Loaded 2 groups, 9 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04E07A48>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\leeyun\.azure\commands\2022-12-07.10-54-34.login.18032.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x04E28DA8>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x04E53388>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x04E53460>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03C4F5C8>, <function CLIQuery.handle_query_parameter at 0x03C6A220>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x04E53418>]
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\leeyun\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\leeyun\.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.windows-ppe.net/organizations/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.windows-ppe.net/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft-ppe.com/oidc/userinfo', 'authorization_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.windows-ppe.net/organizations/kerberos', 'tenant_region_scope': None, 'cloud_instance_name': 'windows-ppe.net', 'cloud_graph_host_name': 'graph.ppe.windows.net', 'msgraph_host': 'graph.microsoft-ppe.com', 'rbac_url': 'https://pas.windows-ppe.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.identity: A web browser has been opened at https://login.windows-ppe.net/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
msal.telemetry: Generate or reuse correlation_id: ee2a0ce3-fb05-48ad-9de7-aec95f9f9069
msal.oauth2cli.oauth2: Using http://localhost:65018 as redirect_uri
msal.oauth2cli.authcode: Abort by visit http://localhost:65018?error=abort
msal.oauth2cli.authcode: Open a browser on this device to visit: https://login.windows-ppe.net/organizations/oauth2/v2.0/authorize?client_id=04b07795-8ddb-461a-bbee-02f9e1bf7b46&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A65018&scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2F.default+offline_access+openid+profile&state=NiZQcyCAJFjoHbtR&code_challenge=GuzCTPDff1Aaq0iFQengqkLO6dWGGwCIl8jN73nMUAw&code_challenge_method=S256&nonce=803827b201e7b57da46815fc9f827a5f29f1bf9bc5a3424a78766209130e9efc&client_info=1&claims=%7B%22access_token%22%3A+%7B%22xms_cc%22%3A+%7B%22values%22%3A+%5B%22CP1%22%5D%7D%7D%7D&prompt=select_account
msal.oauth2cli.authcode: Got auth response: {'code': '0.AAAAmbmazZD0aU-PX1Wz3JbiLJV3sATbjRpGu-4C-eG_e0YBAFE.AgABAAIAAABYrKuFWqWSRpp9FiMCi-70AwDs_wQA7_8L6yFprHFVVC2lEWsMC6FdpH4RlOsML-3r-nEKga4DnNsMb7MpCXjHx7Vi_tIko-TP6m-SwY0Akvgsxii8QeXEZeFu2uzdIGcPf3IsA-O9as-5XEuLG9Mr8OOwFGMheU7cckePTTG3WfCft829Y99zGTHz-5mLgny9RiDbKhtmM6FmzrNNwHlepk-52mXihVGtq-_-MkG13_50P2WPys05yPmVYjLhVZ9Gnqtsa5mELo4z_nCzS6xsC1hOHBzcX5koh9yT1iHguNmeI7Z5dbaG1_HwDszcI3TlFw8XsN6DDkM_k-C5bDCsdN_PqeBOL1hFx7fObQG6wYDR_bUaLNaInfkSuw36hQNSjU84UWuWvYJuAQILSeQwIZ-0hRt7gKVdU5B8hnAWn6_F4fWasIY4C58ixZDDk33aWY5YyM0q2hf0LUWGcwMGdKg0nkrk0V0ezPYBXq64zfI-szcQM0lPUVlMnaIGvKSdXvaxx6C6IUQ7QBYmITMc4jGBl9k9C9VPnbkr88w_SpAKSCitQA0-fnBKqrYT7OyRc28q36j5uOEDPvjwQ3XMLcOohqGFAAJ4jxo6u6wYU017ibWhJXDTHSAPTrG45UcVr64KI1zYCUXNWnnLyr_ZgFBjCFH1ksld4w9EE-yrVh12wjpP4RVBCIiBKxZNrykA7GxeCJBFmvjOogL_iee8BIJVBhi8JNs12KJFPRjxlPmHs5CBMpOO1HA1z5M3Tpo27n9igFMuCzbZS0Ivr6y1DWRhjRAfXJFEVC6HU-m32NhcvI50UDrUI8q_XtE2AECI-zVipP6YamftS0jSEELFtxd2eAzSVn82bth7TQyJcBD23kyUTma408z5q1Xrmd9WySQOlDKFfKhtj9PZP8Ht4PGWqsqI9AWWd7iq0FuFZnTYQUKa85xVJgkn9FtBcRzDSU0xHwe9YqTmn8MLtNlNicXfE-0NpKMEQe0iSy5UZgV83E4', 'client_info': 'eyJ1aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMWU1OC0zNmMzNmNjYmZiN2EiLCJ1dGlkIjoiNDkyNTMwOGMtZjE2NC00ZDJkLWJjN2UtMDYzMTEzMmU5Mzc1In0', 'state': 'NiZQcyCAJFjoHbtR', 'session_state': 'af5c343c-ab3a-465c-97d3-4a7725667de4'}
msal.oauth2cli.authcode: "GET /?code=0.AAAAmbmazZD0aU-PX1Wz3JbiLJV3sATbjRpGu-4C-eG_e0YBAFE.AgABAAIAAABYrKuFWqWSRpp9FiMCi-70AwDs_wQA7_8L6yFprHFVVC2lEWsMC6FdpH4RlOsML-3r-nEKga4DnNsMb7MpCXjHx7Vi_tIko-TP6m-SwY0Akvgsxii8QeXEZeFu2uzdIGcPf3IsA-O9as-5XEuLG9Mr8OOwFGMheU7cckePTTG3WfCft829Y99zGTHz-5mLgny9RiDbKhtmM6FmzrNNwHlepk-52mXihVGtq-_-MkG13_50P2WPys05yPmVYjLhVZ9Gnqtsa5mELo4z_nCzS6xsC1hOHBzcX5koh9yT1iHguNmeI7Z5dbaG1_HwDszcI3TlFw8XsN6DDkM_k-C5bDCsdN_PqeBOL1hFx7fObQG6wYDR_bUaLNaInfkSuw36hQNSjU84UWuWvYJuAQILSeQwIZ-0hRt7gKVdU5B8hnAWn6_F4fWasIY4C58ixZDDk33aWY5YyM0q2hf0LUWGcwMGdKg0nkrk0V0ezPYBXq64zfI-szcQM0lPUVlMnaIGvKSdXvaxx6C6IUQ7QBYmITMc4jGBl9k9C9VPnbkr88w_SpAKSCitQA0-fnBKqrYT7OyRc28q36j5uOEDPvjwQ3XMLcOohqGFAAJ4jxo6u6wYU017ibWhJXDTHSAPTrG45UcVr64KI1zYCUXNWnnLyr_ZgFBjCFH1ksld4w9EE-yrVh12wjpP4RVBCIiBKxZNrykA7GxeCJBFmvjOogL_iee8BIJVBhi8JNs12KJFPRjxlPmHs5CBMpOO1HA1z5M3Tpo27n9igFMuCzbZS0Ivr6y1DWRhjRAfXJFEVC6HU-m32NhcvI50UDrUI8q_XtE2AECI-zVipP6YamftS0jSEELFtxd2eAzSVn82bth7TQyJcBD23kyUTma408z5q1Xrmd9WySQOlDKFfKhtj9PZP8Ht4PGWqsqI9AWWd7iq0FuFZnTYQUKa85xVJgkn9FtBcRzDSU0xHwe9YqTmn8MLtNlNicXfE-0NpKMEQe0iSy5UZgV83E4&client_info=eyJ1aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMWU1OC0zNmMzNmNjYmZiN2EiLCJ1dGlkIjoiNDkyNTMwOGMtZjE2NC00ZDJkLWJjN2UtMDYzMTEzMmU5Mzc1In0&state=NiZQcyCAJFjoHbtR&session_state=af5c343c-ab3a-465c-97d3-4a7725667de4 HTTP/1.1" 200 -
urllib3.connectionpool: Starting new HTTPS connection (1): login.windows-ppe.net:443
urllib3.connectionpool: https://login.windows-ppe.net:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 200 4738
msal.token_cache: event={
    "client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
    "data": {
        "claims": "{\"access_token\": {\"xms_cc\": {\"values\": [\"CP1\"]}}}",
        "client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
        "code": "0.AAAAmbmazZD0aU-PX1Wz3JbiLJV3sATbjRpGu-4C-eG_e0YBAFE.AgABAAIAAABYrKuFWqWSRpp9FiMCi-70AwDs_wQA7_8L6yFprHFVVC2lEWsMC6FdpH4RlOsML-3r-nEKga4DnNsMb7MpCXjHx7Vi_tIko-TP6m-SwY0Akvgsxii8QeXEZeFu2uzdIGcPf3IsA-O9as-5XEuLG9Mr8OOwFGMheU7cckePTTG3WfCft829Y99zGTHz-5mLgny9RiDbKhtmM6FmzrNNwHlepk-52mXihVGtq-_-MkG13_50P2WPys05yPmVYjLhVZ9Gnqtsa5mELo4z_nCzS6xsC1hOHBzcX5koh9yT1iHguNmeI7Z5dbaG1_HwDszcI3TlFw8XsN6DDkM_k-C5bDCsdN_PqeBOL1hFx7fObQG6wYDR_bUaLNaInfkSuw36hQNSjU84UWuWvYJuAQILSeQwIZ-0hRt7gKVdU5B8hnAWn6_F4fWasIY4C58ixZDDk33aWY5YyM0q2hf0LUWGcwMGdKg0nkrk0V0ezPYBXq64zfI-szcQM0lPUVlMnaIGvKSdXvaxx6C6IUQ7QBYmITMc4jGBl9k9C9VPnbkr88w_SpAKSCitQA0-fnBKqrYT7OyRc28q36j5uOEDPvjwQ3XMLcOohqGFAAJ4jxo6u6wYU017ibWhJXDTHSAPTrG45UcVr64KI1zYCUXNWnnLyr_ZgFBjCFH1ksld4w9EE-yrVh12wjpP4RVBCIiBKxZNrykA7GxeCJBFmvjOogL_iee8BIJVBhi8JNs12KJFPRjxlPmHs5CBMpOO1HA1z5M3Tpo27n9igFMuCzbZS0Ivr6y1DWRhjRAfXJFEVC6HU-m32NhcvI50UDrUI8q_XtE2AECI-zVipP6YamftS0jSEELFtxd2eAzSVn82bth7TQyJcBD23kyUTma408z5q1Xrmd9WySQOlDKFfKhtj9PZP8Ht4PGWqsqI9AWWd7iq0FuFZnTYQUKa85xVJgkn9FtBcRzDSU0xHwe9YqTmn8MLtNlNicXfE-0NpKMEQe0iSy5UZgV83E4",
        "code_verifier": "N_3cEdRVQHburmzpohlwsGY.FvK1~qJikB89fCIaS6A",
        "redirect_uri": "http://localhost:65018",
        "scope": [
            "profile",
            "openid",
            "offline_access",
            "https://management.core.windows.net//.default"
        ]
    },
    "environment": "login.windows-ppe.net",
    "grant_type": "authorization_code",
    "params": null,
    "response": {
        "access_token": "********",
        "client_info": "eyJ1aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMWU1OC0zNmMzNmNjYmZiN2EiLCJ1dGlkIjoiNDkyNTMwOGMtZjE2NC00ZDJkLWJjN2UtMDYzMTEzMmU5Mzc1In0",
        "expires_in": 4627,
        "ext_expires_in": 4627,
        "foci": "1",
        "id_token": "********",
        "refresh_token": "********",
        "scope": "https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default",
        "token_type": "Bearer"
    },
    "scope": [
        "https://management.core.windows.net//user_impersonation",
        "https://management.core.windows.net//.default"
    ],
    "token_endpoint": "https://login.windows-ppe.net/organizations/oauth2/v2.0/token"
}
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.windows-ppe.net/organizations/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.windows-ppe.net/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft-ppe.com/oidc/userinfo', 'authorization_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.windows-ppe.net/organizations/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.windows-ppe.net/organizations/kerberos', 'tenant_region_scope': None, 'cloud_instance_name': 'windows-ppe.net', 'cloud_graph_host_name': 'graph.ppe.windows.net', 'msgraph_host': 'graph.microsoft-ppe.com', 'rbac_url': 'https://pas.windows-ppe.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 6fa48061-ba98-4a82-9eae-10faae020be1
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfod.resources.windows-int.net/tenants?api-version=2019-11-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '97698185-7660-11ed-aae3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'login'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 (MSI) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): api-dogfod.resources.windows-int.net:443
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfod.resources.windows-int.net/tenants?api-version=2019-11-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '97698185-7660-11ed-aae3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'login'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 (MSI) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (2): api-dogfod.resources.windows-int.net:443
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfod.resources.windows-int.net/tenants?api-version=2019-11-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '97698185-7660-11ed-aae3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'login'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 (MSI) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (3): api-dogfod.resources.windows-int.net:443
cli.azure.cli.core.sdk.policies: Request URL: 'https://api-dogfod.resources.windows-int.net/tenants?api-version=2019-11-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '97698185-7660-11ed-aae3-70a8d3512c95'
cli.azure.cli.core.sdk.policies:     'CommandName': 'login'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.41.0 (MSI) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (4): api-dogfod.resources.windows-int.net:443
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 139, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 176, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 740, in find_using_common_tenant
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 129, in __next__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 76, in __next__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py", line 689, in get_next
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 211, in run
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  [Previous line repeated 2 more times]
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/core/policies/_base.py", line 47, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/policies/_redirect.py", line 158, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/policies/_retry.py", line 468, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/policies/_retry.py", line 446, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/policies/_authentication.py", line 119, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 71, in send
  [Previous line repeated 1 more time]
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/_base.py", line 103, in send
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/transport/_requests_basic.py", line 361, in send
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x053E8790>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

cli.azure.cli.core.azclierror: <urllib3.connection.HTTPSConnection object at 0x053E8790>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
az_command_data_logger: <urllib3.connection.HTTPSConnection object at 0x053E8790>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04E07B68>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 10.041 seconds (init: 0.602, invoke: 9.439)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3090 in cache
telemetry.check: Negative: The C:\Users\leeyun\.azure\telemetry.txt was modified at 2022-12-07 10:54:11.548312, which in less than 600.000000 s
jiasli commented 1 year ago

I think this is simply because api-dogfod.resources.windows-int.net is not a valid domain:

image

> nslookup api-dogfod.resources.windows-int.net
Server:  cbrspaanuf5b01--commoncorp2-ip3.network.microsoft.com
Address:  10.50.50.50

*** cbrspaanuf5b01--commoncorp2-ip3.network.microsoft.com can't find api-dogfod.resources.windows-int.net: Non-existent domain

According to https://github.com/Azure/azure-cli/issues/20846#issue-1089659664, it should be

- api-dogfod.resources.windows-int.net
+ api-dogfood.resources.windows-int.net

I guess you missed an o in the URL.

leeyun53 commented 1 year ago

@jiasli Oops, yes, after adding an o it worked. Thanks so much for taking a close look into it :)