RestartManager 导致工作角色重新启动 [英] RestartManager causes worker role to restart

查看:49
本文介绍了RestartManager 导致工作角色重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我们遇到了我们的 Azure Worker Role 服务几乎每天都重启的问题.这对我们来说是一个大问题,因为我们的服务需要大约 20 分钟来初始化,而这些重启可能会导致停机.
我通过 RDP 登录到实例并查看事件日志以找出导致这些看似随机重新启动的原因.我遇到了一些总是在重新启动之前的条目:

lately we encountered the problem that our Azure Worker Role service restarts almost every day. This is a huge problem for us, since our service needs around 20 minutes to initialize and these restarts can cause downtimes.
I logged in to the instances via RDP and looked in the event logs to figure out what was causing these seemingly random restarts. I came accross a few entries that always preceded a restart:

MsiInstaller 安装的服务是Windows Azure Remote Forwarder".我假设此服务已安装,因为我们在辅助角色配置中启用了远程桌面.有趣的是,我们已启用 RDP 很长时间(2 年左右),但随机重新启动是在 4 周前才发生的.
但有几件事我不太明白:

The service installed by the MsiInstaller is "Windows Azure Remote Forwarder". I assume this service gets installed because we enabled Remote Desktop in our worker role configuration. The interesting thing is that we have RDP enabled for a long time (2 years or so) but the random restarts are just occuring since 4 weeks ago.
But there are a few things than I don't quite understand:

  1. 为什么此服务的安装或更新如此频繁?
  2. 我知道 RestartManager 负责安装/更新服务,而无需通过停止阻止文件的其他服务来重新启动机器.
    我们的服务有没有可能屏蔽了一些重要的文件?
    我们使用本地磁盘存储临时文件会不会有问题?
  3. 是否可以让 RestartManager 不理会我们的 Worker Role 服务?
  4. 这只是巧合吗?重启是由我们的服务以某种方式触发的,尽管没有日志表明我们这边有错误?

非常感谢任何帮助.

谢谢,
卡斯腾

推荐答案

自我修复:您所看到的很可能是 Windows Installer 自我修复.如果文件被意外修改,这是一种将文件放回原位的机制,但这个最初的目的可能会引发很多问题并导致无休止的修复循环——这可能就是这里发生的事情.很可能已经安装了另一个产品,并且现在存在无法修复的错误情况,这会触发通过 MSI 自我修复进行修复的持续尝试和失败尝试.冲突情况必须通过日志记录和事件查看器调试来识别,并且必须应用适当的修复 (实际修复).

简要说明:以下是我对自我修复或恢复力"真正含义的最简洁的解释:为什么如果我删除文件,MSI 安装程序会重新配置吗?

重启管理器:重启管理器功能 是 - 正如你自己所说(其他人可能会读到) - 只是一种重新启动应用程序的设置方式,而不是通过使应用程序能够自行关闭并以受控方式重新启动"来重新启动系统".

  • 可能发生的情况是您的服务无法使用其本机启动/停止程序及时关闭 - 或者 MSI 没有尝试使用内置的 MSI 服务控制机制重新启动服务.您的服务要么没有及时停止,要么没有完全停止.也许.我想这可能会触发重新启动管理器事件.当然,如果您将 REINSTALLMODE 设置为 "amus" - 无论版本如何,都强制覆盖所有文件.
  • 鉴于这里的人是开发人员,也许是如何在您的应用程序中实现重启管理器支持的技术示例:如何向我的应用程序添加对 Windows 重启管理器的支持?(高级安装程序).
  • 大量重新启动管理器链接和信息(中间页)

默认 MSI 日志记录:一个调试起点是 正确记录您的所有 MSI 操作 - 每当您安装、重新安装或修复时,临时目录中都会有一个日志文件(并非总是可以接受)对于某些系统管理员).您可以按照上述链接中全局用于机器上的所有设置"部分中的步骤为所有 MSI 安装启用日志记录.

Default MSI Logging: One debugging starting point is to log all your MSI operations properly - whenever you install, reinstall or repair there will be a log file in the temp directory (not always acceptable for some sysadmins). You can enable logging for all MSI installations by following the procedure in the "Globally for all setups on a machine" section in the above link.

详细自我修复:我之前写过很多关于意外自我修复的文章.比任何人都想知道的更多.这是一个非常愚蠢的问题,由于很少有人熟悉 Windows Installer 的操作,因此它确实会导致解决非常昂贵的问题:

Self-Repair in Detail: I have written a lot about unexpected self-repair before. More than anyone wants to know. It is a terribly silly problem that does cause really expensive problems to resolve since few people are familiar with the operation of Windows Installer:

  1. 自我修复- 解释
  2. 自我修复 - 寻找现实世界的解决方案
  3. 自我修复 - 如何在自己的包裹中避免它

<小时>

调试:以上答案中提供了以下所有信息,但这里有一些快速提示:


Debugging: All the information below is available in the above answers, but here are some quick pointers:

  • 您可以使用以下方法确定触发修复的确切 MSI 组件:http://www.installsite.org/pages/en/msifaq/a/1037.htm.
  • 打开事件查看器并在应用程序"中查看带有事件源MsiInstaller"的警告:ID 10011004.
  • 最近安装的另一个软件包可能会触发一个持续的错误情况,在修复过程中无法永久解决,您必须确定来源并以某种方式消除它.上面的第二项链接(此处重复:寻找现实世界的解决方案).
  • You can determine the exact MSI component that triggers the repair using the following approach: http://www.installsite.org/pages/en/msifaq/a/1037.htm.
  • Open the Event Viewer and look in "Applications" for warnings with event source "MsiInstaller": IDs 1001 and 1004.
  • Some recent installation of another package could trigger a constant error situation that can not be resolved permanently during repair and you must identify the source and eliminate it somehow. The item two link above (repeated here: finding real-world solutions).

等待重启:这台机器多久重启一次?许多机器都注册了许多从未完成的挂起重启,并可能导致问题.触发重新启动(警告)可能涉及许多注册表位置.Get-PendingReboot-Query.还有类似的PowerShell脚本.

锁定问题:只想提一下某些应用程序以非常低级的方式锁定资源,例如防病毒恶意软件保护套件.

这篇关于RestartManager 导致工作角色重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆