简体   繁体   English

无法在运行 Windows 的 Azure VM 上配置 Azure Insights

[英]Unable to configure Azure Insights on Azure VM running Windows

I am attempting to configure the Log Analytics agent for Insights on my Azure VM running Windows. When I attempt to deploy the monitoring configuration, the DependencyAgentWindows VM extension fails to install.我正在尝试在运行 Windows 的 Azure VM 上为 Insights 配置 Log Analytics 代理。当我尝试部署监视配置时,DependencyAgentWindows VM 扩展无法安装。 I have the same solution working on a similar VM and am stumped on what the issue is for the failing VM.我在类似的 VM 上使用相同的解决方案,但对失败的 VM 的问题感到困惑。 [在此处输入图片描述](https://i.stack.imgur.com/M6F0c.png)

{"code":"DeploymentFailed","message":"At least one resource deployment> operation failed. Please list deployment operations for details.> Please see https://aka.ms/DeployOperations for usage details.","details":"code":"VMExtensionHandlerNonTransientError","message":"The handler for VM extension type 'Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows' has reported terminal failure for VM extension 'DependencyAgentWindows' with error message: 'Install failed for plugin (name: Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows, version 9.10.16.22650) with exception Command C:\Packages\Plugins\Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows\9.10.16.22650\scripts\RunPs1.cmd of Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows has exited with Exit code: 52'.\r\n \r\n'Install handler failed for the extension. More information on troubleshooting is available at 8 {"code":"DeploymentFailed","message":"至少一个资源部署 > 操作失败。请列出部署操作以获取详细信息。> 请参阅https://aka.ms/DeployOperations了解使用详情。","details ":"code":"VMExtensionHandlerNonTransientError","message":"VM 扩展类型 'Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows' 的处理程序报告了 VM 扩展'DependencyAgentWindows' 的终端故障,错误消息为:'安装失败plugin (name: Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows, version 9.10.16.22650) with exception Command C:\Packages\Plugins\Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows\9.10.16.22650\scripts\RunPs1.cmd of Microsoft .Azure.Monitoring.DependencyAgent.DependencyAgentWindows 已退出,退出代码为:52'。\r\n \r\n'扩展安装处理程序失败。有关故障排除的更多信息,请访问8 8105633527088://aka.ms/VMExtensionDependencyAgentWindowsTroubleshoot'"}]} 8105633527088://aka.ms/VMExtensionDependencyAgentWindowsTroubleshoot'"}]}

I have tried to deploying the Monitoring Configuration and installing the DepencyAgentWindows VM Extension through the Portal and through PowerShell. I am expecting the DepencyAgentWindows VM Extension to install properly and be able to enable Insights successfully.我已尝试通过门户和 PowerShell 部署监视配置并安装 DepencyAgentWindows VM 扩展。我希望 DepencyAgentWindows VM 扩展能够正确安装并能够成功启用 Insights。

Exit code: 52" typically indicates that there was an issue installing the Dependency Agent on a Windows server. The error message "Install handler failed for the extension" suggests that the installation failed during the extension handler installation step.退出代码:52" 通常表示在 Windows 服务器上安装依赖代理时出现问题。错误消息“扩展安装处理程序失败”表明安装在扩展处理程序安装步骤中失败。

There could be multiple reason why the installation failed:安装失败可能有多种原因:

If the server doesn't meet the requirement like Operating system version, PowerShell version etc. If there are some other software/extensions already installed on the server which are conflicting with the Dependency Agent.如果服务器不满足操作系统版本、PowerShell 版本等要求。如果服务器上已经安装了一些与 Dependency Agent 冲突的其他软件/扩展。 An issue with the execution policy.执行策略的问题。 Inadequate permissions, issues with accessing the inte.net, or issues with the storage account.权限不足、访问 inte.net 问题或存储帐户问题。 You can follow the below steps to troubleshoot the issue:您可以按照以下步骤解决问题:

Ensure that the operating system version, PowerShell version, and other dependencies of the Dependency Agent are met.确保满足Dependency Agent的操作系统版本、PowerShell版本和其他依赖。 Make sure that there are no conflicting software/extensions installed on the server that could be causing the problem.确保服务器上没有安装可能导致问题的冲突软件/扩展。 Check that the execution policy is set correctly.检查执行策略是否设置正确。 Check the Network Security Group and Firewall rules to make sure that it allows traffic to Azure and Azure Monitor.检查网络安全组和防火墙规则以确保它允许流量到 Azure 和 Azure 监视器。 Ensure that you have the permissions necessary to install the extension, and that you have a storage account configured for use with Azure Monitor.确保你拥有安装扩展所需的权限,并且你有一个存储帐户配置为与 Azure Monitor 一起使用。 You can also look for more detailed logs in the Azure Portal which should provide more information about the root cause of the issue.您还可以在 Azure 门户中查找更详细的日志,其中应提供有关问题根本原因的更多信息。 If you are still not able to figure it out, you can open a support request with Azure Support team.如果您仍然无法解决问题,可以向 Azure 支持团队提出支持请求。 They can help you troubleshoot the issue and assist you in resolving it.他们可以帮助您解决问题并协助您解决问题。

I tried to reproduce same in my environment I got the results successfully like below.我尝试在我的环境中重现相同的结果,我成功地得到了如下所示的结果。

This issue usually occurs if.network connectivity issues preventing the plugin from being downloaded and if the extension won't work properly if the vm agent is failing to report a status to the Azure platform..如果网络连接问题导致无法下载插件,并且如果 vm 代理未能向 Azure 平台报告状态,扩展将无法正常工作,则通常会发生此问题。

To resolve this issue:要解决此问题:

Try to delete if any other extension is already exists in your vm如果您的虚拟机中已存在任何其他扩展,请尝试删除

In virtual machine -> extension -> uninstall在虚拟机->扩展->卸载

在此处输入图像描述

In monitor -> virtual machine -> configure insights -> enable -> monitoring configuration -> configure在监控->虚拟机->配置insights->启用->监控配置->配置

在此处输入图像描述

When I try to deploy, it deployed successfully like below:当我尝试部署时,它部署成功,如下所示:

在此处输入图像描述

If still issue persists, try to uninstall the vm and Redeploy it and also check the MsDoc to know the supported operating system versions.如果问题仍然存在,请尝试卸载 vm 并重新部署它,同时检查MsDoc以了解支持的操作系统版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM