服务已进入不可预测的状态

Microsoft.Windows.Server.6.2.OperatingSystem.ServiceEnteredUnpredictableState.Alert (Rule)

服务已进入不可预测的状态。

Knowledge Base article:

摘要

当服务控制管理器检测到服务使用无效的配置启动时,此规则生成警报。值得注意的是,尽管服务控制管理器检测到无效配置,服务仍然会成功地启动。

服务可能无法按预期运行,并可能以不可预测的方式执行操作。另外,在解决问题之前,服务可能无法重新启动。

示例事件:

以下任何事件发生并记录在系统事件日志中时,此规则生成警报:

%1 服务标记为交互服务。但是,系统配置为不允许交互服务。此服务可能无法正常运行。

服务控制管理器在撤消对 %1 服务的配置更改时遇到错误。服务 %2 当前处于不可预测的状态。如果不改正此配置,可能无法重新启动 %1 服务,或者可能遇到其他错误。若要确保服务配置正确,请使用 MMC 中的服务管理单元。

原因

发生以下任何情况时,会生成此警报:

解决方法

此警报有两个可能的解决方法。参阅生成警报的事件,选择适当的一组解决方法步骤。

事件 ID:7030

若要解决此警报,请向主题专家或供应商咨询,确定服务是否必须在桌面上交互运行。如果不是,请执行下列步骤:

如果服务必须交互运行,你将需要更改“允许服务与桌面交互”系统策略。要实现这一点,请执行下列操作:

HKLM\System\CCC\Control\Windows

0 - 启用

1 - 禁用

事件 ID:7037

请执行下列操作以解决此警报:

Element properties:

TargetMicrosoft.Windows.Server.6.2.OperatingSystem
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
服务已进入不可预测的状态
{0}
Event LogSystem

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Windows.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.Windows.Server.6.2.OperatingSystem.ServiceEnteredUnpredictableState.Alert" Enabled="true" Target="WindowsServer!Microsoft.Windows.Server.6.2.OperatingSystem" ConfirmDelivery="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="EventDS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>System</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventSourceName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Service Control Manager</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>7037</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>7030</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.Server.6.2.OperatingSystem.ServiceEnteredUnpredictableState.Alert.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>