Ask a questionAsk a question
 

AnswerUnable to Log Event using ETW in RoleManager

  • Sunday, November 01, 2009 1:03 PMConor McGrath Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Guys,

    I have run into a problem with the RoleManager in a Worker Role that I have developed. 

    This simple line  ->  RoleManager.WriteToLog("Information", "Working"); generates an exeception -

    Microsoft.ServiceHosting.ServiceRuntime.RoleException was unhandled by user code
      Message="Unable to Log Event using ETW."
      Source="Microsoft.ServiceHosting.ServiceRuntime"
      StackTrace:
           at Microsoft.ServiceHosting.ServiceRuntime.Implementation.Events.RoleEventLog.Log(String message)
           at Microsoft.ServiceHosting.ServiceRuntime.RoleManager.WriteToLog(String eventLogName, String message)
           at WorkerRole1.WorkerRole.Start()
           at Microsoft.VisualStudio.CloudService.WindowsAzureIntegration.DebuggingRoleEntryPoint.Start()
           at Microsoft.ServiceHosting.ServiceRuntime.Internal.RoleEntryPointProxy.<Start>b__4()
           at Microsoft.ServiceHosting.ServiceRuntime.Internal.LogRoleEntryPointProxy.<>c__DisplayClass9.<DoAction>b__8()
           at Microsoft.ServiceHosting.ServiceRuntime.Internal.RuntimeCommon.DoAction(Action act)
      InnerException:

    Any ideas on this? This was working before.
    • Moved byEvan BasalikMSFTSunday, November 01, 2009 6:37 PMMoving to a better forum (From:SQL Azure — Getting Started)
    •  

Answers

  • Saturday, November 07, 2009 3:03 PMConor McGrath Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Steve, thank you. I checked and it was my doing. I have left the default messgaing loop in the worker role and removed the 10 second delay. Opps..

    Conor.
    • Marked As Answer byConor McGrath Saturday, November 07, 2009 3:03 PM
    •  

All Replies

  • Monday, November 02, 2009 7:15 PMSteve MarxMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We've sometimes seen this error when you're logging in a very tight loop.  Perhaps a threshold is being hit.  Does that sound likely in your code?
  • Saturday, November 07, 2009 3:03 PMConor McGrath Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Steve, thank you. I checked and it was my doing. I have left the default messgaing loop in the worker role and removed the 10 second delay. Opps..

    Conor.
    • Marked As Answer byConor McGrath Saturday, November 07, 2009 3:03 PM
    •