当我使用 SDK 2.0 在 Azure 模拟器中运行应用程序时,我在控制台输出中一次又一次地重复出现以下错误。下面的错误指出“系统资源不足......”但它是我的开发机器上唯一运行的东西,它有 6 核 Xeon、32 GB 内存和充足的硬盘空间。另外,我在 Windows 中看不到任何东西事件查看器。是什么导致了这些错误?
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: EtwListener
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: etw.cpp
[MonAgentHost] Error: EtwListener::StartRealTimeSession
[MonAgentHost] Error: 3605
[MonAgentHost] Error: 0
[MonAgentHost] Error: 5aa
[MonAgentHost] Error: Insufficient system resources exist to complete the requested service.
[MonAgentHost] Error: ERROR:EnableTraceEx() to enable provider failed
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: EtwListener
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: etw.cpp
[MonAgentHost] Error: EtwListener::SetupEventing
[MonAgentHost] Error: 1876
[MonAgentHost] Error: ffffffff80010008
[MonAgentHost] Error: 0
[MonAgentHost] Error:
[MonAgentHost] Error: Failed to start the etw real time user session
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: EtwListener
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: etw.cpp
[MonAgentHost] Error: EtwListener::Start
[MonAgentHost] Error: 1758
[MonAgentHost] Error: ffffffff80010008
[MonAgentHost] Error: 0
[MonAgentHost] Error:
[MonAgentHost] Error: Failed to start event tracing
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: MonAgent
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: monagent.cpp
[MonAgentHost] Error: MonAgent::InitializeEtw
[MonAgentHost] Error: 1303
[MonAgentHost] Error: ffffffff80010008
[MonAgentHost] Error: 0
[MonAgentHost] Error:
[MonAgentHost] Error: Error: Failed to start ETW providers
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: MonAgent
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: monagent.cpp
[MonAgentHost] Error: MonAgent::InitializeForStart
[MonAgentHost] Error: 221
[MonAgentHost] Error: ffffffff80010008
[MonAgentHost] Error: 0
[MonAgentHost] Error:
[MonAgentHost] Error: Failed to start the ETW providers
[MonAgentHost] Error: MA EVENT: 2013-07-13T12:49:53.944Z
[MonAgentHost] Error: 2
[MonAgentHost] Error: 12640
[MonAgentHost] Error: 12644
[MonAgentHost] Error: MonAgent
[MonAgentHost] Error: 0
[MonAgentHost] Error: 12c939f8-b82a-48fc-bb30-cc66717
[MonAgentHost] Error: monagent.cpp
[MonAgentHost] Error: MonAgent::Start
[MonAgentHost] Error: 2215
[MonAgentHost] Error: ffffffff80010008
[MonAgentHost] Error: 0
[MonAgentHost] Error:
[MonAgentHost] Error: Failed initialize agent sub-components
这是我的服务定义:
<WorkerRole name="SPS.Azure.FooService" vmsize="Small">
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.Level" />
</ConfigurationSettings>
</WorkerRole>
这是我的服务配置:
<Role name="SPS.Azure.FooService">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.Level" value="Verbose" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="ausername" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="apassword" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2014-05-10T23:59:59.0000000-04:00" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
</ConfigurationSettings>
</Role>
这是我的 wadcfg 文件:
<?xml version="1.0" encoding="utf-8"?>
<DiagnosticMonitorConfiguration configurationChangePollInterval="PT1M" overallQuotaInMB="4096" xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<DiagnosticInfrastructureLogs />
<Directories>
<IISLogs container="wad-iis-logfiles" />
<CrashDumps container="wad-crash-dumps" />
</Directories>
<Logs bufferQuotaInMB="1024" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
<WindowsEventLog bufferQuotaInMB="1024" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose">
<DataSource name="Application!*" />
</WindowsEventLog>
</DiagnosticMonitorConfiguration>
这是我的 App.config 文件中的诊断配置:
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
<filter type=""/>
</add>
</listeners>
</trace>
</system.diagnostics>