【问题标题】:How to fix core dump error on Azure Cloud Shell?如何修复 Azure Cloud Shell 上的核心转储错误?
【发布时间】:2021-04-23 22:06:38
【问题描述】:

每当我启动 Azure Cloud shell 时,它都会崩溃并出现以下错误。任何想法如何摆脱这个错误。任何帮助表示赞赏。

Requesting a Cloud Shell.Succeeded.
Connecting terminal...

Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Configuration.PowerShellConfig' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Platform' threw an exception.
 ---> System.IO.IOException: Bad message
   at System.IO.FileSystem.CreateDirectory(String fullPath)
   at System.IO.Directory.CreateDirectory(String path)
   at System.Management.Automation.Platform.SelectProductNameForDirectory(XDG_Type dirpath) in /PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs:line 343
   at System.Management.Automation.Platform..cctor() in /PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs:line 145
   --- End of inner exception stack trace ---
   at System.Management.Automation.Configuration.PowerShellConfig..ctor() in /PowerShell/src/System.Management.Automation/engine/PSConfiguration.cs:line 91
   at System.Management.Automation.Configuration.PowerShellConfig..cctor() in /PowerShell/src/System.Management.Automation/engine/PSConfiguration.cs:line 57
   --- End of inner exception stack trace ---
   at System.Management.Automation.Utils.GetPolicySettingFromConfigFile[T](ConfigScope[] preferenceOrder) in /PowerShell/src/System.Management.Automation/engine/Utils.cs:line 784
   at System.Management.Automation.Utils.GetPolicySetting[T](ConfigScope[] preferenceOrder) in /PowerShell/src/System.Management.Automation/engine/Utils.cs:line 760
   at Microsoft.PowerShell.CommandLineParameterParser.GetConfigurationNameFromGroupPolicy() in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs:line 578
   at Microsoft.PowerShell.ConsoleHost.ParseCommandLine(String[] args) in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs:line 289
   at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc) in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs:line 82
   at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args) in /PowerShell/src/powershell/Program.cs:line 71
Aborted (core dumped)

【问题讨论】:

    标签: azure azure-cloud-shell


    【解决方案1】:

    这可能是您的个人资料中的某些内容或损坏的云驱动器图像。要“恢复出厂设置”您的 cloudshell,请执行以下操作:

    • 导航到用于 cloudshell 存储的资源组
    • 导航到此资源组中的存储帐户
    • 导航到“文件共享”,您应该会看到一个名为“cloudshellshare”的共享。
    • 删除此共享。
    • 重新启动/启动 cloudshell。这应该会给工厂带来新鲜的云壳。

    【讨论】:

    • 在检查门户时,我没有看到任何名为 cloudshell 的资源组。你如何看待 cloudshell RG?
    • 根据出厂重置建议,我使用 bash 运行命令 clouddrive unmount。并重新启动 cloudshell。它奏效了
    猜你喜欢
    • 2021-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-13
    • 2017-04-05
    • 2019-09-03
    • 1970-01-01
    • 2017-07-24
    相关资源
    最近更新 更多