Azure CLI未安装。但这确实是

发布于 2025-02-03 13:35:07 字数 5389 浏览 4 评论 0原文

大家好,大家都感谢您的帮助。

上下文:我正在尝试运行(本地)使用(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

日裸衫吸 2025-02-10 13:35:07

我得到答案。

问题是由Intellij引起的,因为这是出于某种原因而没有采用路径变量。
我如何解决?

在我的终端中运行:

echo $PATH

编辑您的运行配置添加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:

echo $PATH

Edit your run configuration adding the env variable, something like that:
enter image description here

And that's it!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文