You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Cloud Shell在Windows终端中立即退出问题排查求助

Windows终端中Azure Cloud Shell启动后立即退出(错误代码1)的可能原因

在Windows终端中使用Azure Cloud Shell时,选择租户后成功请求实例,但终端立即退出,返回错误代码1 (0x00000001),但浏览器端Azure门户的Cloud Shell可正常使用。会话记录如下:

Tenant 0: XXXXXXXX Directory (xxxxxxx.com)
Please enter the desired tenant number.
Enter n to login with a new account
Enter r to remove the above saved connection settings.
> 0
Requesting a cloud shell instance...
Succeeded.
Requesting a terminal (this might take a while)...

[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

可能的原因及排查方向

  • 本地Cloud Shell缓存损坏:Windows终端会存储Cloud Shell的本地配置和缓存文件,文件损坏会导致启动失败。可删除%USERPROFILE%\.azure\cloudshell目录下的所有内容,重启Windows终端后重新尝试连接。
  • Windows终端配置冲突:近期修改过终端配置文件(settings.json),比如字体、配色或启动参数,可能和Cloud Shell适配出现问题。可临时重置终端配置到默认状态,再测试连接。
  • Cloud Shell实例状态异常:虽然浏览器端正常,但Windows终端对应的实例可能存在异常。在Azure门户的Cloud Shell中,点击右上角设置图标,选择「重置Shell」,之后回到Windows终端重试。
  • 身份验证凭据异常:本地存储的Azure身份验证缓存可能过期或损坏。在Windows终端执行az logout注销账户,再用az login重新登录,然后启动Cloud Shell。
  • 网络限制干扰:本地代理或防火墙可能阻断了Windows终端与Cloud Shell的会话连接。临时关闭代理或防火墙,测试是否能正常连接,确认后调整规则放行相关通信。

内容的提问来源于stack exchange,提问作者Donny Kwitty

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 09:06:13