{"record":{"id":"7cd63c25ad2ae05a","repo":"apache/hadoop","slug":"aadtoken-http-connection-to-failed-for-getting-7cd63c","errorCode":null,"errorMessage":"AADToken: HTTP connection to {} failed for getting token from AzureAD.","messagePattern":"AADToken: HTTP connection to (.+?) failed for getting token from AzureAD\\.","errorType":"http","errorClass":"HttpException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java","lineNumber":504,"sourceCode":"                        + (responseBody.isEmpty()\n                          ? \"\"\n                          : (\"\\nFirst 1K of Body: \" + responseBody));\n        LOG.debug(logMessage);\n        if (httpResponseCode == HttpURLConnection.HTTP_OK) {\n          // 200 is returned by some of the sign-on pages, but can also\n          // come from proxies, utterly wrong URLs, etc.\n          throw new UnexpectedResponseException(httpResponseCode,\n              requestId,\n              operation\n                  + \" Unexpected response.\"\n                  + \" Check configuration, URLs and proxy settings.\"\n                  + \" proxies=\" + proxies,\n              authEndpoint,\n              responseContentType,\n              responseBody);\n        } else {\n          // general HTTP error\n          throw new HttpException(httpResponseCode,\n              requestId,\n              operation,\n              authEndpoint,\n              responseContentType,\n              responseBody);\n        }\n      }\n    } finally {\n      if (conn != null) {\n        conn.disconnect();\n      }\n    }\n    return token;\n  }\n\n  private static AzureADToken parseTokenFromStream(\n      InputStream httpResponseStream, boolean isMsi) throws IOException {\n    AzureADToken token = new AzureADToken();","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java#L486-L522","documentation":"Error \"AADToken: HTTP connection to {} failed for getting token from AzureAD.\" thrown in apache/hadoop.","triggerScenarios":"The HTTP connection to Azure AD fails outright (DNS, TLS, connectivity) while fetching an access token.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity to the Azure AD token endpoint.","Verify proxy settings and firewall rules allow outbound HTTPS to login.microsoftonline.com.","Retry after resolving transient network issues."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}