WAS 无法运行应用程序池可执行的自动关机

Microsoft.Windows.InternetInformationServices.10.0.WAS.did.not.run.the.automatic.shutdown.executable.for.application.pool (Rule)

Knowledge Base article:

摘要

网站和 Web 应用程序依赖于 Internet Information Services (IIS) 应用程序池的可用性。而 IIS 应用程序池又依赖于 Windows Process Activation Service (WAS)。如果在启动或关闭应用程序池时,WAS 未运行或发生错误,则网站和 Web 应用程序可能不可用。

解决方法

检查自动关闭可执行文件

可以配置在 World Wide Web 发布服务 (W3SVC) 关闭应用程序池时自动运行用户特定的可执行文件。例如,可执行文件可以重定向应用程序池的流量到另一个服务器。可在 IIS 管理器中指定该文件,同时以 ApplicationHost.config 文件中的 system.applicationHost/applicationPools/failure 部分的 autoShutdownExe 属性表示。

如果 autoShutdownExe 进程运行失败,可能的解决方法包括:

检查是否正确指定路径和文件名

检查关闭可执行文件的访问控制列表

确保程序可独立执行

独立于应用程序池关闭事件测试运行可执行程序。如果进程可以独立于应用程序池关闭运行,则当 WAS 自动禁用应用程序池时,该进程应能正常运行。

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.10.0.ApplicationPool
CategoryAlert
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.Server.IIS.10.0.WarningAndErrorEventProvider Default
Filter ConditionDetection Microsoft.Windows.InternetInformationServices.10.0.ApplicationPool.EventFilter Default
WA WriteAction Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.10.0.WAS.did.not.run.the.automatic.shutdown.executable.for.application.pool" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.10.0.ApplicationPool" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Windows.Server.IIS.10.0.WarningAndErrorEventProvider">
<LogName>System</LogName>
</DataSource>
</DataSources>
<ConditionDetection ID="Filter" TypeID="Microsoft.Windows.InternetInformationServices.10.0.ApplicationPool.EventFilter">
<Expression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(5054|5091)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-WAS</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.10.0.WAS.did.not.run.the.automatic.shutdown.executable.for.application.pool.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>