WSUS – Update Services – Error: Connection Error

Posted by robd on July 03, 2017
WSUS

WSUS console kept crashing with the reset console error:

The WSUS administration console was unable to connect to the WSUS Server via the remote API. 

Verify that the Update Services service, IIS and SQL are running on the server. If the problem persists, try restarting IIS, SQL, and the Update Services Service.

System.Net.WebException -- The operation has timed out

Source
System.Web.Services

Stack Trace:
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at Microsoft.UpdateServices.Internal.DatabaseAccess.ApiRemotingCompressionProxy.GetWebResponse(WebRequest webRequest)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.UpdateServices.Internal.ApiRemoting.ExecuteSPGetUpdateServerStatus(Int32 updateSources, Boolean includeDownstreamComputers, String updateScopeXml, String computerTargetScopeXml, String preferredCulture, Int32 publicationState, Int32 propertiesToGet)
   at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPGetUpdateServerStatus(UpdateSources updateSources, Boolean includeDownstreamComputers, String updateScopeXml, String computerTargetScopeXml, String preferredCulture, ExtendedPublicationState publicationState, UpdateServerStatusPropertiesToGet propertiesToGet)
   at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetStatus(UpdateSources updateSources, Boolean includeDownstreamComputers, UpdateScope updatesToInclude, ComputerTargetScope computersToInclude, UpdateServerStatusPropertiesToGet propertiesToGet)
   at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetReplicaStatus(UpdateSources updateSources)
   at Microsoft.UpdateServices.UI.AdminApiAccess.CachedObject.RefreshCache()
   at Microsoft.UpdateServices.UI.AdminApiAccess.CachedObject.GetFromCache()
   at Microsoft.UpdateServices.UI.SnapIn.Pages.ServerSummaryPage.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

So after doing all the normal IIS stuff, got Microsoft involved and here’s what they did to fix it:

  • We checked and ensured that none of the services crashed or stopped after console crashes,
  • We checked and ensured that WSUSPool was also running,
  • We checked and ensured that SQL service was also running on the remote server,
  • We increased the WSUSPool PrivateMemoryLimit to unlimited by setting it to ‘0’ on the IIS console
  • We also increased the Maximum queue length from 1000 to 3000,
  • We stopped WSUSPool and Restarted the IIS service,

We ran below mentioned on SQL to check and find if there are Obsoletes update to clean up but found none

exec spGetObsoleteUpdatesToCleanup

 

  • We found that console was failing to connect with below error as well
  • We removed the WSUS mmc from folder %appdata%\Microsoft\MMC\
  • We tried to connect again to WSUS console but with no avail

 

  • We further investigated and ensured that WSUS s failing to connect with SUSDB as it is timing out
  • We checked and found that SUSDB size was more than 6.5 GB
  • We restarted the SQL Service for instance hosting SUSDB
  • We tried to connect to WSUS console after restarting the service and it connected successfully
  • We see that there were more than 13,000 approved updates on WSUS console
  • This could cause an issue for WSUS to connect as it would take a long time to connect with SUSDB
  • We decided to run PowerShell script to decline superseded updates from WSUS to enhance the performance of WSUS while connecting to SUSDB
  • We ran PowerShell script from below mentioned link to decline superseded updates
    https://blogs.technet.microsoft.com/configurationmgr/2015/04/15/support-tip-configmgr-2012-update-scan-fails-and-causes-incorrect-compliance-status/
  • Superseded updates were declined successfully
PS C:\Scripts> cd e:
PS E:\> cd .\ms\
PS E:\ms> .\sus.ps1 -updateserver WSUS_SERVER -port 80
Connecting to WSUS server WSUS_Server on Port 80... Connected.
Getting a list of all updates... Done
Parsing the list of updates... Done.
List of superseded updates: E:\SupersededUpdates.csv
Summary:
========
All Updates = 17101
Any except Declined = 15718
All Superseded Updates = 9621
    Superseded Updates (Intermediate) = 6801
    Superseded Updates (Last Level) = 2820

SkipDecline flag is set to False. Continuing with declining updates
 DeclineLastLevel is set to False. Declining all superseded updates.
 Declined 9621 updates.
 Backed up list of superseded updates to E:\SupersededUpdatesBackup.csv
  • We changed the WSUS to use customwebsite port 8530 again
  • WSUSUtil.exe usecustomewebsite true

     

  • WSUS was successfully changed to port 8530
  • We tried to open WSUS console and it connected successfully
  • We ran synchronization on WSUS server and it completed successfully
  • BOOOM WOOP

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.