locked
WHS Error Bug on Win7 Client Shutdown: More RRS feed

  • General discussion

  • Like many of you, I'm upset with this bug where Win7 PCs that shut down generate a "red light" error on my (HP) Home Server running WHS. I can't believe MS wasted more than one hour of my life trying to fix this.

    I have a simple question: On my client laptop running Win7, can I control the order in which applications shut down, in order to shut down the WHS Connector before my antivirus program shuts down? Does Win 7 shut them down in reverse order of them starting? If so, can I change the order in which they are started?

    Tuesday, February 2, 2010 12:01 PM

All replies

  • This is a timing issue, as I think you realize, but unfortunately it's sort of out of the control of the Windows Home Server team.

    That said, if you would like to see this addressed, you can submit feedback on Connect. Search first, I think it's likely that others have complained about this already. :)

    I'm not on the WHS team, I just post a lot. :)
    Tuesday, February 2, 2010 3:52 PM
    Moderator
  • Perhaps there is a way to work around this. Can you try an experiment? On your laptop, open "Services" and find the WHS Connector Service. Stop the service and then shut down the laptop. Does this change the symptom?

    If yes, then we can come up with a way to automate this using Task Scheduler.
    Tuesday, February 2, 2010 6:12 PM
  • Mark-

    This did not seem to work. On my laptop, I went in and stopped the service (curiously, it did not stop the first try). Then I shut down. Error messages somehow still got thru to the WHS server.
    Wednesday, February 3, 2010 12:13 AM
  • None:

    Check the "Recovery" tab on the service. It may be set to automatically restart the service upon a failure. I think that the default is to do this twice. Try changing to "Take no action" then stop the service and make sure that it remains stopped. Does this act any differently?
    Wednesday, February 3, 2010 12:20 AM
  • Weird. I made the change in Recovery, but after Apply and OK it still took 3 times to Stop.

    But, this time, when I shut down, the error did not occur.

    I rebooted, then shut down (without stopping), and the error returned.

    I rebooted, and in Services it said "Take No Action" for all 3 instances.

    I click "Stop"- error, won't stop. "Stop" error, won't stop, and then on the 3rd instance it Stops.

    It's ignoring the Recovery options I set.

    This is a joke. MS didn't even test any of this stuff.
    Saturday, February 6, 2010 2:13 AM
  • I'm new here, but as a network engineer by day, I think maybe we're trying to solve this the hard way in using task scheduler, or by trying to stop the WHS connector service.  I'm NOT a server or desktop OS specialist, but feel that if someone more knowledgeable in these areas could figure out a way, possibly by associating service dependencies, to drop the client's network connection as a first step during shutdown, say before the AV service stops, the WHS connector would simply not be able to report the lack of AV software to the WHS.  This should solve the problem as I see it.

    I too have 3 laptops and one home PC all of which are running Windows 7, with a mix of Eeye Digital Security Blink and AVG.  ALL of my machines, upon shutting down, cause the WHS network monitor to turn red and report missing or out of date antivirus software until they are restarted.

    Hope someone can sort this out soon because it is a REAL problem which causes users to STOP monitoring for out of date or missing antivirus altogether, which is a very dangerous thing to do in the long run.  It also defeats one of the main reasons I chose WHS in the first place.

    Thanks!
    Saturday, February 6, 2010 2:58 AM
  • Strange - I just tried this on my Win 7 PC.

    For the WHS Connector service I changed all recovery options on the Recovery tab to "Take no Action" and then hit "Apply".
    Went back to the "General" tab and stopped the service and it stopped right away.
    Hit "Start" and it restarted right away.

    I don't have an explanation for what your PC is doing, but at least this gets at the root of the issue. If the Connector service is stopped before shutting the PC down then no antivirus warning is reported for the PC.

    If you're ever successful in getting WHS Connector to stop on command then you could use a scheduled task as a workaround. The task needs to run with elevated credentials or as SYSTEM and would execute:

    sc stop WHSConnector

    followed by a shutdown command:

    shutdown -s -t 5   (5 is the number of seconds to wait before shutdown; change to suit)

    You could create a shortcut to this scheduled task that executes:

    schtasks /run taskname where taskname is the name of your task

    Put the shortcut on your desktop and double-click it to shut down the PC.
    Saturday, February 6, 2010 3:22 AM
  • Mindpaint:
    ...but feel that if someone more knowledgeable in these areas could figure out a way, possibly by associating service dependencies, to drop the client's network connection as a first step during shutdown, say before the AV service stops, the WHS connector would simply not be able to report the lack of AV software to the WHS.  This should solve the problem as I see it.
    You're right of course, but a Windows user has very little control over these things. On Linux you can easily change the sequence that processes start and stop in but on Windows you have to convince Microsoft that there is a problem and then wait for them to fix it. In the mean time, the only tools at your disposal are kludges and workarounds.

    Funny that my W7 laptop using Microsoft Security Essentials does not exhibit the problem. None of the PCs on the home network do, but many others are reporting this as an issue so it certainly does exist.
    Saturday, February 6, 2010 4:09 AM
  • Seems making the network service a dependency of the WHS connector service or visa versa might do the trick, I'm researching exactly how to do this via the registry but have not figured it out quite yet.
    Saturday, February 6, 2010 4:21 AM
  • This is amazing- I have a brand new Win7 Home Premium (Sony) laptop, connected to an EX470 Server running a fully updated WHS (PP3) and connected with an updated WHC.

    Can anyone else try this? Can you go into the "Recovery" pane of the "Properties" of the WHC Service, change all 3 options to "Take No Action," "Apply" and "OK" these, reboot your laptop, go back to the Service and try to "Stop" it manually?

    Monday, February 8, 2010 3:37 PM
  • Done... service will not stop.
    Friday, February 12, 2010 11:11 PM
  • OK.  This is what my research has uncovered...

    The WHSConnector service would need to be modified.  By default, Service Control Manager (SCM) will automatically start the dependencies before starting the dependent service itself. However, during system shutdown, the SCM does not take dependencies into consideration when stopping services.   In windows Vista and 7 however, this can be modified.  First, the WHSConnector service would have to be registered for pre-shutdown notifications.  After this it could be inserted into the list stored in the PreShutDownOrder string value in the HKLM\SYSTEM\CurrentControlSet\Control key. This list is processed first during shutdown, and the SCM will shut down the services in this list according to their order, which would force the WHSConnector service to be shut down before any antivirus or firewall service is shut down.  Using Sysinternals psservice.exe program, I have determined that the WHSConnector service is NOT registered for pre-shutdown notifications at this time.

    If anyone out there is a programmer, you could add the code below to the WHSConnector service so that its control handler would call the SetServiceStatus with the SERVICE_ACCEPT_PRESHUTDOWN control code and would receive the SERVICE_CONTROL_PRESHUTDOWN control code. Then, the service control manager would wait until the WHSConnector service stops or the specified preshutdown time-out value expires before shutting down other services such as AV and firewall services.

    -------------------------------------------------------------------------------
    CODE:

    Syntax

    C++
    DWORD WINAPI HandlerEx(
      __in  DWORD dwControl,
      __in  DWORD dwEventType,
      __in  LPVOID lpEventData,
      __in  LPVOID lpContext
    );

    Parameters

    dwControl [in]

    The control code.

     

    SERVICE_CONTROL_PRESHUTDOWN
    0x0000000F

     

    ----------------------------------------------------------------------------
    You can read more about all of this here...

    http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/Vista_Services.docx

    and here...


    I have also included my results as returned by Sysinternals psservice.exe on the WHSConnector service and a service that has been registerd for Pre-shutdown below:

    From a command prompt:

    C:\>psservice query whsconnector

    PsService v2.22 - Service information and configuration utility
    Copyright (C) 2001-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com

    SERVICE_NAME: WHSConnector
    DISPLAY_NAME: Windows Home Server Connector Service
    Maintains the connection between this computer and the Windows Home Server.  If
    this service is stopped, this computer appears offline to the home server.
            TYPE              : 10 WIN32_OWN_PROCESS
            STATE             : 4  RUNNING
                                   (STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE   : 0  (0x0)
            SERVICE_EXIT_CODE : 0  (0x0)
            CHECKPOINT        : 0x0
            WAIT_HINT         : 0x0

    and...

    C:\>psservice query wuauserv

    PsService v2.22 - Service information and configuration utility
    Copyright (C) 2001-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com

    SERVICE_NAME: wuauserv
    DISPLAY_NAME: Windows Update
    Enables the detection, download, and installation of updates for Windows and oth
    er programs. If this service is disabled, users of this computer will not be abl
    e to use Windows Update or its automatic updating feature, and programs will not
     be able to use the Windows Update Agent (WUA) API.
            TYPE              : 20 WIN32_SHARE_PROCESS
            STATE             : 4  RUNNING
                                   (STOPPABLE,NOT_PAUSABLE,ACCEPTS_PRESHUTDOWN)
            WIN32_EXIT_CODE   : 0  (0x0)
            SERVICE_EXIT_CODE : 0  (0x0)
            CHECKPOINT        : 0x0
            WAIT_HINT         : 0x0

    I hope this helps someone in Microsoft's WHS team to solve this terrible problem.

    Friday, February 12, 2010 11:53 PM
  • Mindpaint:

    Nice work. However, the chances of anyone from Microsoft reading this are slim. If you want to get the message to Microsoft, go to Connect and see if someone has filed a bug report about this issue. There are probably several since this problem seems widespread. Post a comment to the bug report referring Microsoft to this thread.
    Saturday, February 13, 2010 1:36 AM
  • I was finally able to register and report the bug as it had NOT been reported.  The similar "start up issue" was there, however this issue is occuring during shutdown.  I directed them to this thread.  The bug ID is 533368.
    Saturday, February 13, 2010 2:37 AM