none
DNS Server Service and Windows Event Log not Starting RRS feed

  • Question

  • Hi,

    I am having a problem with my Hyper-V Virtual Machine and any help would be appreciated.

    Network and Internet are still working fine on my Hyper-V Virtual Server running Windows Server 2008 R2 configured as a Domain Controller. I've noticed that several services that are supposed to start automatically, including several Exchange Server 2010 services, are not running and won't start. These include the Windows Event Log and DNS Server services, which I suspect are the prime cause of the problems.

    When trying to start DNS Server, I get the following error:

    Windows Could not start the DNS Server service on Local Computer.

    Error 1722: The RPC server is unavailable.

    When trying to start the Windows Event Log, I get the following error:

    Windows could not start the Windows Event Log service on Local Computer.

    Error 31: A device attached to the system is not functioning.

    I had this problem previously and ended up replacing the Hyper-V VM with an earlier version I had exported previously. I can probably do the same again, but this problem has now recurred and I would like to get to the bottom of it.

    I am not running snapshots due to previous performance issues.

    Any help would be appreciated.

    Kind Regards,

    Johan Küstner

    Tuesday, May 31, 2011 12:01 PM

Answers

  • Hi,

    I have solved the problem!

    The issue is that I have used an EventLogHelper class provided by another developer and never first checked to ensure that it is working correctly.

    The EventLogHelper.WriteEventLogEntry method does not first check to see if the Event Log being written to exists. I have now modified the method using the EventLog.CreateEventSource method to first check to see if the Event Log exists and then create it if it doesn't.

    If the Custom Windows Service attempts to write to an Event Log that doesn't exist, on startup, the Windows Event Log Service therefore stops working.

    Regards,

    Johan

    Monday, July 4, 2011 11:38 AM

All replies

  • Hi,

    Just an update...

    I believe that the culprit could be a Windows Service I have developed.

    I have developed a Windows Service in Visual Studio 2010 with a Setup and Deployment Package that uses .NET Framework 4 instead of .NET Framework 4 Client Profile. Every time I build and install this Windows Service, then when I reboot the machine, the DNS Server and Windows Event Log Services no longer start.

    The Windows Service seems to be the cause because, when I built a new Virtual Machine from scratch with the same specifications and software installed, and then built and installed the Windows Service, the same problem arose after a reboot.

    Note that the Windows Service writes to the Event Log. I wonder if it is not possible that when Windows starts, that this Windows Service is trying to write to the Event Log before the Windows Event Log Service has even started, resulting in the problem. But this is just a guess.

    Regards,

    Johan

    Thursday, June 9, 2011 1:29 PM
  • Hi,

    Just an update to let everyone know that this is nowhere near being solved.

    My problem lies specifically with the Windows Event Log Service and has nothing to do with the DNS Server Service. Probably, the reason that the DNS Server Service is also not working is that it must somehow be dependant on the Windows Event Log Service.

    I have verified that the problem indeed lies with the Windows Event Log Service by building three separate virtual machines, one as an AD domain controller, one as an Exchange Server and one as a Windows Server 2008 R2 development machine with Dynamics CRM 2011, VS 2010 SP1 and SQL Server 2008 R2, amongst others. I therefore have the DC and Exchange Server now working completely independantly of each other on separate machines and the DNS Server Service on the DC is completely unaffected.

    When I compile and build a specific Windows Service that interacts with the Dynamics CRM 2011 API, and then install it, after a restart of the machine, the Windows Event Log Service no longer start with Error 31 being issued when attempting to start it. If I then uninstall the Windows Service, the problem does not go away.

    Does anybody have a solution?

    Regards,

    Johan

    Thursday, June 16, 2011 2:14 PM
  • Hi,

    I have solved the problem!

    The issue is that I have used an EventLogHelper class provided by another developer and never first checked to ensure that it is working correctly.

    The EventLogHelper.WriteEventLogEntry method does not first check to see if the Event Log being written to exists. I have now modified the method using the EventLog.CreateEventSource method to first check to see if the Event Log exists and then create it if it doesn't.

    If the Custom Windows Service attempts to write to an Event Log that doesn't exist, on startup, the Windows Event Log Service therefore stops working.

    Regards,

    Johan

    Monday, July 4, 2011 11:38 AM