首页 > 解决方案 > 执行 connect-AzureRm 命令 Powershell 时检索缓存令牌时出错

问题描述

我正在运行一个 powershell 脚本,它创建一个 azurerm 连接并执行一些操作。所以,当我在远程服务器上本地运行脚本时,它工作得非常好。但是,当我在连接到同一个远程服务器的 talend 上运行 SAME 脚本时,我遇到了问题。因此,我在 talend 中面临的错误是,从缓存中检索令牌时存在一些问题。我在下面附上了错误

 DEBUG: 8:54:15 AM - ConnectAzureRmAccountCommand begin processing with ParameterSet 
 'ServicePrincipalWithSubscriptionId'.
 DEBUG: 8:54:15 AM - Autosave setting from startup session: 'CurrentUser'
 DEBUG: 8:54:15 AM - No autosave setting detected in environment variable 'AzureRmContextAutoSave'. 
 DEBUG: 8:54:15 AM - Using Autosave scope 'CurrentUser'
 DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: 
 'ca3451a2-786a-4345d-562a-36ed7dfc6a6', Endpoint: 'https://login.microsoftonline.com/', ClientId: 
 '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 
 'https://management.core.windows.net/', ValidateAuthrity: 'True'
 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : 
 DEBUG: 09/03/2018 08:54:15:  - AuthenticationContext: ADAL .NET with assembly version '2.28.3.860', file version 
 '2.28.31117.1411' and informational version '78bd21073cfd91768d97894ace1ba90c5b904eec' is running...
 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : 
 DEBUG: 09/03/2018 08:54:15: 562ecf62-44e4-4a8c-936f-2aefds6c2d64f - AcquireTokenHandlerBase: === Token Acquisition 
 started:
  Authority: https://login.microsoftonline.com/ca3451a2-786a-4345d-562a-36ed7dfc6a6/
  Resource: https://management.core.windows.net/
  ClientId: ef34fabe-78b4-56tf-8677-0acde5caci0d6
  CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (0 items)
  Authentication Target: Client

 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : 
 DEBUG: 09/03/2018 08:54:15:  - TokenCache: Deserialized 0 items to token cache.
 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : 
 DEBUG: 09/03/2018 08:54:15: 562ecf62-44e4-4a8c-936f-2aefds6c2d64f - TokenCache: Looking up cache for a token...
 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : 
 DEBUG: 09/03/2018 08:54:15: 314e5662-7434-237c-956f-2aa8356cd64f - TokenCache: No matching token was found in the cache
 DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Error: 4 : 
 DEBUG: 09/03/2018 08:54:15: 562ecf62-34e3-442c-936f-2aefds6c6fe78df - <RunAsync>d__0: 
 Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: Service returned error. Check InnerException for 
 more details ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

标签: azurepowershelltalend

解决方案


推荐阅读