Wednesday, September 4, 2013

Windows Server 2012 WSUS Server Not Downloading Updates

I had just configured a brand new Windows Server 2012 WSUS Server however a problem was experienced where the server was not downloading updates.  It was a freshly deployed WSUS Server which was configured to synchronise against the Microsoft Update Servers.  The WSUS Server was performing synchronisations according to the preconfigured schedule, and the synchronisation log was showing that new updates were successfully synchronised.

Despite this, the WsusContent folder remained empty.

These symptoms are shown in the following screenshot.


The following errors were also experienced in the servers application logs:

Log Name:      Application
Source:        Windows Server Update Services
Date:          4/09/2013 6:28:44 AM
Event ID:      10032
Task Category: 7
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ADM-WSUS-01.domain.local
Description:
The server is failing to download some updates.



Log Name:      Application
Source:        Windows Server Update Services
Date:          4/09/2013 1:22:15 AM
Event ID:      364
Task Category: 2
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ADM-WSUS-01.domain.local

Description:
Content file download failed. Reason: Value does not fall within the expected range. Source File: /d/msdownload/update/software/defu/2013/08/am_base_patch1_160dc153e5db49297bd527404b2c03e540291cbd.exe Destination File: E:\WSUS\WsusContent\BD\160DC153E5DB49297BD527404B2C03E540291CBD.exe.



After leasing with members of the WSUS team it was discovered a bug existed in Windows Server 2012 when using proxy servers which requires authentication, as per my WSUS deployment.


Microsoft has developed a hotfix for this issue which can be downloaded from the following location.  Companies must request the hotfix and Microsoft will email the download link.

http://support.microsoft.com/kb/2838998

Only download this hotfix if you are experiencing the documented issue above.

After you install the hotfix a reboot of the WSUS server is required.

Once the hot fix is installed and the system has been rebooted, you must reset the WSUS content repository.  This is because WSUS "thinks" in the SQL database that all updates have been downloaded when in fact they failed.   To do this perform the following steps:

1) Close any open WSUS consoles.
2) Go to Administrative Tools – Services and STOP the Update Services service.
3) In Windows Explorer browse to the WSUSContent folder (typically D:\WSUS\WSUSContent or C:\WSUS\WSUSContent)
4) Delete ALL the files and folders in the WSUSContent folder.
5) Go to Administrative Tools – Services and START the Update Services service.
6) Open a command prompt and navigate to the folder: C:\Program Files\Update Services\Tools.
7) Run the command WSUSUtil.exe RESET


As soon as you run the WSUSUtil.exe reset command, this command takes a while to complete.  Unfortunately there is no progress bar or message which lets you know the reset has completed.  A handy trick is to monitor the Windows Internal Database SQL Instance for WSUS, this is busy with high CPU activity as it checks every update in the SQL database against the files in the WsusContent folder.  As soon as the SQL activity dies down you know the command has completed.


After this perform another sync.  You will then notice the WSUS Server begin to download the updates by verifying the WSUSContent directory growing.

 
Please not the WSUSContent takes a long time to download and will most likely pause consistently through the download process.  As soon as you verify the content size is growing, log off the server and leave it for 24 hours.

14 comments:

  1. be careful with wsusutil /reset you may have to reinstall wsus because this command takes months(!) to complete.

    ReplyDelete
    Replies

    1. windows server 2008 datacenter product key , microsoft windows 7 home premium german cd key , genuine windows 7 ultimate key free , free microsoft outlook 2010 product key , microsoft office mac keystore , windows 8.1 professional key , office 2016 product key , free download activated genuine ms office 2010 professional plus , lDx78O

      Delete
  2. Thanks for your input Anonymous. Hopefully that doesn't happen to me as I have used that command on many WSUS servers over the years and never had an issue.

    ReplyDelete
  3. The longest this command has taken for me is like 20 minutes.

    ReplyDelete
  4. Saved the day! This was driving me nuts!

    ReplyDelete
  5. Saved my day too, followed the clear steps and thanks a lot for the knowledge transfer.

    ReplyDelete
  6. That "wsusutil.exe reset" does not report progress bugs me also all the time. Another approach is to check %ProgramFiles%\Update Services\LogFiles\SoftwareDistribution.log and once there are no new entries in the last 5 minutes, the reset has apprently finished. Also not very beautiful.

    ReplyDelete
  7. Worked for me. "WSUSUtil.exe Reset" took about 30 seconds. Little less than a month as mentioned above.

    We use a dedicated SQL Server Standard and use that rather than the Internal DB or SQL Express which are both limited to how much RAM they can use. To see the process taking place you need to go to your database server's task manager, the WSUS Server will show no indication.

    ReplyDelete
  8. I tried the instructions to reset using wsusutil.exe and that worked for me, even without the hotfix. The hotfix did not apply to my environment, since we were not using a proxy server but the updates still would not download. I tried the wsusutil.exe reset command and after it completed the directories got created and my downloads then started going!

    ReplyDelete
  9. Just a question: do I need to delete ALL the files and folders in the WSUSContent folder or not? In my case I've lost some folders, so I could avoid to delete all the rest if not needed.
    Thank You for your great post,

    Alessandro

    ReplyDelete
  10. The visual tutorial is very awesome and represent the entire process very friendly. iphone app development

    ReplyDelete
  11. key do windows 7 , mssql 2008 r2 standard key , cheap office 2016 series key , windows 10 serial key number , office 2013 key sale , window 7 key online , product key for window 7 ultimate 32 bit , windows 10 activation hack , lOX9PO

    buy office 2016 product key

    windows server 2012 r2 free

    rosetta stone french key sale

    ReplyDelete
  12. Thanks for this. Worked like a charm.
    http://ITnMore.be

    ReplyDelete