Azure CLI未安装。但这确实是
大家好,大家都感谢您的帮助。
上下文:我正在尝试运行(本地)使用(Connect)Azure获取Env vars的Springboot应用程序。我正在使用Manjaro OS。 (linux)
项目编译良好,Intellij索引良好,我的意思是总的来说都很好。
当我尝试运行gradlle bootrun 运行弹簧应用程序的任务时,它会失败此错误:
2022-06-01 08:29:29.645 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
在页面中查找错误显示的页面,我知道我知道所有我拥有的安装是可以的。 我的意思是,路径var可以, az login 命令运行正常。
然后,总而言之,在我的Manjaro Linux OS中,我已经安装了Azure CLI,并且已经在其中签名,但是当我运行Spring Boot应用程序时,我会出现已显示的错误。 这里完整的日志。
2022-06-01 08:29:29.645 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.646 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.647 ERROR 4349 --- [smos-parallel-1] trace[] span[] com.azure.identity.AzureCliCredential : Azure Identity => ERROR in getToken() call for scopes [https://xxxxxxxxx.documents.azure.com/.default]: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.648 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.core.credential.SimpleTokenCache : Failed to acquire a new access token.
2022-06-01 08:29:29.652 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.c.i.GlobalEndpointManager : Fail to reach global gateway [https://xxxxxxxxxx.documents.azure.com:443/], [AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot]
2022-06-01 08:29:29.656 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.c.i.GlobalEndpointManager : startRefreshLocationTimerAsync() - Unable to refresh database account from any location. Exception: com.azure.identity.CredentialUnavailableException: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
com.azure.identity.CredentialUnavailableException: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
at com.azure.identity.implementation.IdentityClient.authenticateWithAzureCli(IdentityClient.java:472)
at com.azure.identity.AzureCliCredential.getToken(AzureCliCredential.java:39)
at com.azure.cosmos.implementation.RxDocumentClientImpl.lambda$new$0(RxDocumentClientImpl.java:331)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
at reactor.core.publisher.FluxFromMonoOperator.subscribe(FluxFromMonoOperator.java:83)
at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286)
at org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth.lambda$null$6(ReactorSleuth.java:312)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2022-06-01 08:29:29.657 ERROR 4349 --- [ main] trace[] span[] c.a.c.i.RxDocumentClientImpl : Client initialization failed. Check if the endpoint is reachable and if your auth token is valid. More info: https://aka.ms/cosmosdb-tsg-service-unavailable-java
2022-06-01 08:29:29.658 ERROR 4349 --- [ main] trace[] span[] c.a.c.i.RxDocumentClientImpl : unexpected failure in initializing client.
Hi everyone Thanks in advance for your help.
Context: I am trying to running a SpringBoot Application (Locally) which use (connect) Azure to get Env vars. I am using Manjaro OS. (Linux)
The project compiles well, Intellij index well, I mean in general all look good.
When I try to run the Task of Gradlle bootRun which run the spring app, it fails with this error:
2022-06-01 08:29:29.645 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
Finding in the page where the error is showing I am aware that all the installation that I have, is ok.
I mean, Path var is ok, az login command runs ok.
Then in summary in my Manjaro Linux OS I have installed azure cli and I already Signed in it, but when I run the spring boot app, I have the error that I already showed.
Here the full log.
2022-06-01 08:29:29.645 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.646 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.i.implementation.IdentityClient : AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.647 ERROR 4349 --- [smos-parallel-1] trace[] span[] com.azure.identity.AzureCliCredential : Azure Identity => ERROR in getToken() call for scopes [https://xxxxxxxxx.documents.azure.com/.default]: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
2022-06-01 08:29:29.648 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.core.credential.SimpleTokenCache : Failed to acquire a new access token.
2022-06-01 08:29:29.652 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.c.i.GlobalEndpointManager : Fail to reach global gateway [https://xxxxxxxxxx.documents.azure.com:443/], [AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot]
2022-06-01 08:29:29.656 ERROR 4349 --- [smos-parallel-1] trace[] span[] c.a.c.i.GlobalEndpointManager : startRefreshLocationTimerAsync() - Unable to refresh database account from any location. Exception: com.azure.identity.CredentialUnavailableException: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
com.azure.identity.CredentialUnavailableException: AzureCliCredential authentication unavailable. Azure CLI not installed.To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/java/identity/azclicredential/troubleshoot
at com.azure.identity.implementation.IdentityClient.authenticateWithAzureCli(IdentityClient.java:472)
at com.azure.identity.AzureCliCredential.getToken(AzureCliCredential.java:39)
at com.azure.cosmos.implementation.RxDocumentClientImpl.lambda$new$0(RxDocumentClientImpl.java:331)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
at reactor.core.publisher.FluxFromMonoOperator.subscribe(FluxFromMonoOperator.java:83)
at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286)
at org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth.lambda$null$6(ReactorSleuth.java:312)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2022-06-01 08:29:29.657 ERROR 4349 --- [ main] trace[] span[] c.a.c.i.RxDocumentClientImpl : Client initialization failed. Check if the endpoint is reachable and if your auth token is valid. More info: https://aka.ms/cosmosdb-tsg-service-unavailable-java
2022-06-01 08:29:29.658 ERROR 4349 --- [ main] trace[] span[] c.a.c.i.RxDocumentClientImpl : unexpected failure in initializing client.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我得到答案。
问题是由Intellij引起的,因为这是出于某种原因而没有采用路径变量。
我如何解决?
在我的终端中运行:
编辑您的运行配置添加Env变量,类似的内容:

就是这样!
I get the answer.
The problem was caused by Intellij, since this one for some reason was not taking the PATH variable.
How I can solve it?
run in my terminal:
Edit your run configuration adding the env variable, something like that:

And that's it!!