Handling problem: Diagnostics Monitor is not sending diagnostics logs to Azure Storage after upgrading Windows Azure SDK from 1.2 to 1.3

When you upgrade your service from Windows Azure SDK 1.2 to Windows Azure SDK 1.3 it is possible that your application running in Windows Azure, stop sending diagnostics logs. We have seen a few cases where such problem occurred. Not everyone have encountered the problem however if you encounter this problem you need to collect the logs related with MonAgentHost entries in it. You potentially could see something as below:

 [Diagnostics]: Checking for configuration updates 11/30/2010 02:19:09 AM.
[MonAgentHost] Error: MA EVENT: 2010-11-30T07:21:35.149Z
[MonAgentHost] Error:   2
[MonAgentHost] Error:   4492
[MonAgentHost] Error:   8984
[MonAgentHost] Error:   NetTransport
[MonAgentHost] Error:   0
[MonAgentHost] Error:   x:\rd\rd_fun_stable\services\monitoring\shared\nettransport\src\netutils.cpp
[MonAgentHost] Error:   OpenHttpSession
[MonAgentHost] Error:   686
[MonAgentHost] Error:   0
[MonAgentHost] Error:   57
[MonAgentHost] Error:   The parameter is incorrect.
[MonAgentHost] Error:   WinHttpOpen: Failed to open manually set proxy <null>; 87
[MonAgentHost] Error: MA EVENT: 2010-11-30T07:21:35.249Z
[MonAgentHost] Error:   2
[MonAgentHost] Error:   4492
[MonAgentHost] Error:   8984
[MonAgentHost] Error:   NetTransport
[MonAgentHost] Error:   0
[MonAgentHost] Error:   x:\rd\rd_fun_stable\services\monitoring\shared\nettransport\src\netutils.cpp
[MonAgentHost] Error:   OpenHttpSession
[MonAgentHost] Error:   686
[MonAgentHost] Error:   0
[MonAgentHost] Error:   57
[MonAgentHost] Error:   The parameter is incorrect.
[MonAgentHost] Error:   WinHttpOpen: Failed to open manually set proxy <null>; 87
[Diagnostics]: Checking for configuration updates 11/30/2010 02:20:11 AM.

The above errors will be logged by DiagnosticsAgent.exe (MonAgentHost.exe in Windows Azure 1.2) every time when the Diagnostic Monitor is trying to transfer the
logs to the Table Storage. So the problem is actually occurred when the log are supposed to transfer from the diagnostics monitor tool depend on your *. ScheduledTransferPeriod() function.

 

To solve this problem you will not to disable to <sites> </sites> section in the ServiceDefinition.csdef as highlighted below:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="Your_Service_Name" xmlns="https://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="MyWebRole" enableNativeCodeExecution="true">
    <!--<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>-->
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
  </WebRole>
</ServiceDefinition>

You must know that when you comment/remove the above <sites> </sites> section from the service definition (csdef) you are running your application in HWC (Hostable Web Core) means within WaWebHost.exe process instead of full IIS role w3wp.exe. Having <sites> </sites> section in service definition (csdef) allow you to run your application in full web role. It is also suggested that commenting <sites> </sites> section in service definition (csdef) means your application is running in legacy (Windows Azure SDK 1.2) based webrole.