Unable to Launch WSUS Console – Error: Connection Error

Error: Connection Error

If you are receiving a WSUS error saying Error: Connection Error when trying to connect to the WSUS (Windows Server Update Services) server, there are several potential causes and solutions you can try.

We build the WSUS server and it’s working fine for a few months but after we got a WSUS error saying “Error: Connection Error” while opening the WSUS console. To understand the issue we need to check the error code and based on the code we can perform the troubleshooting on the WSUS server.

What is WSUS Server?

WSUS stands for Windows Server Update Services, and it is a Microsoft tool used for managing and distributing updates and patches to Windows servers and workstations in an enterprise environment.

Also Read – 200+ Shortcut Key for Excel for Beginner to Pro

WSUS provides a centralized location for administrators to approve and distribute updates to their network of Windows devices. The updates can include security patches, software updates, and other critical updates. By using WSUS, administrators can control when updates are installed and can ensure that all devices are updated consistently.

It is a valuable tool for IT administrators who need to manage updates for a large number of Windows devices. It helps ensure that devices are up-to-date and secure, and it can reduce the amount of time and effort required to manage updates across an enterprise network.

What is Error: Connection Error | WSUS Error Reset Server Node

The Error: Connection error or WSUS error Reset Server Node is a generic error message that indicates that a connection of the WSUS server could not be established and you will not able to open the WSUS console. Check the error message you will receive in your WSUS console.

Error: Connection Error

If you click on the copy error to clipboard it will copy the complete error details. Paste the error in Notepad and check the error details.

Also Read – Salary Slip PDF, Word and Excel Format with Formula

Why Facing Error: Connection Error

This Error: Connection Error or WSUS error Reset Server Node is a very common issue. You will face this issue only after a few months of building your new WSUS server. This error happens if you do not perform periodic cleanup activity on your WSUS server.

Alert

If you are getting this error then you will not be able to launch the WSUS console and client machine also does not receive the patches it will throw some error message.

How to Resolve WSUS Error Reset Node | Error: Connection Error

We saw lots of server admins has been reported this issue and multiple times asked in a public forum about this Error: Connection Error. Read the below article to get the complete solution and readymade script to fix the issue.

1. Check the Type of DB Used in WSUS

Before starting the troubleshooting process you need to know what type of database you are using in your WSUS server. To check the database details go to the registry path.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Update Services\Server\Setup
WSUS WID Database

Here my database type is an inbuilt database that is a WID database. If you are using an SQL database then it will show SQL.

Also Read – Top 30 Shortcut Key for Refresh

2. Install SQL Management Studio

If you are using the WID database then you need to install the latest version of SQL Server Management Studio on the WSUS Server to perform the SQL cleanup query. If already installed or using an SQL database you can skip the step.

SQL Server Management Studio (SSMS) Microsoft

Download Free SQL Server Management Studio (SSMS) to perform the cleanup activity on WSUS Server.
FREE Download
Click the download button to get the package from the official Microsoft website
 SQL Management Studio

License is not required you can use the free version of SQL Management Studio to run the SQL query.

3. Connect SQL Server Management Studio

Go to start and search for SQL Server Management Studio and click on open. Once opened then use the below commands to connect the local WID database.

Starting with Windows Server 2012, the named pipe to access is

\\.\pipe\MICROSOFT##WID\tsql\query

For older systems, the pipe is different and is named

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
WSUS SQL WID Connect

4. Execute the SQL Query

Once SQL Server Management Studio has been connected go to the Database from the left side then click on New Query from the top option and execute the query given in A, B, D steps.

WSUS SQL Query

Now paste the below SQL query one by one and click on Execute button. It will take a few seconds to execute the query.

(A). Reindex WSUS DB

USE SUSDB; 
GO 
SET NOCOUNT ON; 
 
-- Rebuild or reorganize indexes based on their fragmentation levels 
DECLARE @work_to_do TABLE ( 
    objectid int 
    , indexid int 
    , pagedensity float 
    , fragmentation float 
    , numrows int 
) 
 
DECLARE @objectid int; 
DECLARE @indexid int; 
DECLARE @schemaname nvarchar(130);  
DECLARE @objectname nvarchar(130);  
DECLARE @indexname nvarchar(130);  
DECLARE @numrows int 
DECLARE @density float; 
DECLARE @fragmentation float; 
DECLARE @command nvarchar(4000);  
DECLARE @fillfactorset bit 
DECLARE @numpages int 
 
-- Select indexes that need to be defragmented based on the following 
-- * Page density is low 
-- * External fragmentation is high in relation to index size 
PRINT 'Estimating fragmentation: Begin. ' + convert(nvarchar, getdate(), 121)  
INSERT @work_to_do 
SELECT 
    f.object_id 
    , index_id 
    , avg_page_space_used_in_percent 
    , avg_fragmentation_in_percent 
    , record_count 
FROM  
    sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, 'SAMPLED') AS f 
WHERE 
    (f.avg_page_space_used_in_percent < 85.0 and f.avg_page_space_used_in_percent/100.0 * page_count < page_count - 1) 
    or (f.page_count > 50 and f.avg_fragmentation_in_percent > 15.0) 
    or (f.page_count > 10 and f.avg_fragmentation_in_percent > 80.0) 
 
PRINT 'Number of indexes to rebuild: ' + cast(@@ROWCOUNT as nvarchar(20)) 
 
PRINT 'Estimating fragmentation: End. ' + convert(nvarchar, getdate(), 121) 
 
SELECT @numpages = sum(ps.used_page_count) 
FROM 
    @work_to_do AS fi 
    INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id 
    INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id 
 
-- Declare the cursor for the list of indexes to be processed. 
DECLARE curIndexes CURSOR FOR SELECT * FROM @work_to_do 
 
-- Open the cursor. 
OPEN curIndexes 
 
-- Loop through the indexes 
WHILE (1=1) 
BEGIN 
    FETCH NEXT FROM curIndexes 
    INTO @objectid, @indexid, @density, @fragmentation, @numrows; 
    IF @@FETCH_STATUS < 0 BREAK; 
 
    SELECT  
        @objectname = QUOTENAME(o.name) 
        , @schemaname = QUOTENAME(s.name) 
    FROM  
        sys.objects AS o 
        INNER JOIN sys.schemas as s ON s.schema_id = o.schema_id 
    WHERE  
        o.object_id = @objectid; 
 
    SELECT  
        @indexname = QUOTENAME(name) 
        , @fillfactorset = CASE fill_factor WHEN 0 THEN 0 ELSE 1 END 
    FROM  
        sys.indexes 
    WHERE 
        object_id = @objectid AND index_id = @indexid; 
 
    IF ((@density BETWEEN 75.0 AND 85.0) AND @fillfactorset = 1) OR (@fragmentation < 30.0) 
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REORGANIZE'; 
    ELSE IF @numrows >= 5000 AND @fillfactorset = 0 
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD WITH (FILLFACTOR = 90)'; 
    ELSE 
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD'; 
    PRINT convert(nvarchar, getdate(), 121) + N' Executing: ' + @command; 
    EXEC (@command); 
    PRINT convert(nvarchar, getdate(), 121) + N' Done.'; 
END 
 
-- Close and deallocate the cursor. 
CLOSE curIndexes; 
DEALLOCATE curIndexes; 
 
 
IF EXISTS (SELECT * FROM @work_to_do) 
BEGIN 
PRINT 'Estimated number of pages in fragmented indexes: ' + cast(@numpages as nvarchar(20)) 
SELECT @numpages = @numpages - sum(ps.used_page_count) 
FROM 
@work_to_do AS fi 
INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id 
INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id 
 
PRINT 'Estimated number of pages freed: ' + cast(@numpages as nvarchar(20)) 
END 
GO 
 
--Update all statistics semhush.com
PRINT 'Updating all statistics.' + convert(nvarchar, getdate(), 121)  
EXEC sp_updatestats 
PRINT 'Done updating statistics.' + convert(nvarchar, getdate(), 121)  
GO

SQL Query for Reindex WSUS DB SQL

Download the SQL query commands for reindexing the WSUS database.
FREE Download
WSUS stands for Windows Server Update Services

(B). Delete Decline Updates

USE SUSDB; 
GO 
DECLARE @var1 INT 
DECLARE @msg nvarchar(100) 
 
CREATE TABLE #results (Col1 INT) 
INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup 
 
DECLARE WC Cursor 
FOR 
SELECT Col1 FROM #results 
 
OPEN WC 
FETCH NEXT FROM WC 
INTO @var1 
WHILE (@@FETCH_STATUS > -1) 
BEGIN SET @msg = 'Deleting ' + CONVERT(varchar(10), @var1) 
RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1 
FETCH NEXT FROM WC INTO @var1 END 
 
CLOSE WC 
DEALLOCATE WC 
DROP TABLE #results

SQL Query for Delete Declined Updates SQL

Download the SQL query commands to delete the declined updates from the WSUS database.
FREE Download
WSUS stands for Windows Server Update Services

(C). Delete Declined Updates

Kindly run PowerShell with admin privilege and copy/paste the below commands o PowerShell and execute it.

$wsusserver = "localhost"
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($wsusserver,$False,"8530")
$wsus.getupdates() | Where {$_.IsDeclined -eq 'True'} | ForEach-Object { $wsus.DeleteUpdate($_.Id.UpdateID); Write-Host $_.Title removed }

PowerShell for Delete Declined Updates PowerShell

Download the PowerShell command to delete the declined updates from the WSUS database.
FREE Download
WSUS stands for Windows Server Update Services

(D). Decline Superseded Updates

DECLARE @thresholdDays INT = 30
DECLARE @testRun BIT = 0
DECLARE @uid UNIQUEIDENTIFIER
DECLARE @title NVARCHAR(500)
DECLARE @date DATETIME
DECLARE @userName NVARCHAR(100) = SYSTEM_USER 
DECLARE @count INT = 0 
DECLARE DU CURSOR FOR
       SELECT MU.UpdateID, U.DefaultTitle, U.CreationDate FROM vwMinimalUpdate MU
       JOIN PUBLIC_VIEWS.vUpdate U ON MU.UpdateID = U.UpdateId
       WHERE MU.IsSuperseded = 1 AND MU.Declined = 0 AND MU.IsLatestRevision = 1
       AND MU.CreationDate < DATEADD(dd,-@thresholdDays,GETDATE())
       ORDER BY MU.CreationDate 
PRINT 'Declining superseded updates older than ' + CONVERT(NVARCHAR(5), @thresholdDays) + ' days.' + CHAR(10) 
OPEN DU
FETCH NEXT FROM DU INTO @uid, @title, @date
WHILE (@@FETCH_STATUS > - 1)
BEGIN 
       SET @count = @count + 1
       PRINT 'Declining update ' + CONVERT(NVARCHAR(50), @uid) + ' (Creation Date ' + CONVERT(NVARCHAR(50), @date) + ') - ' + @title + ' ...'
       IF @testRun = 0
              EXEC spDeclineUpdate @updateID = @uid, @adminName = @userName, @failIfReplica = 1 
       FETCH NEXT FROM DU INTO @uid, @title, @date
END 
CLOSE DU
DEALLOCATE DU 
PRINT CHAR(10) + 'Attempted to decline ' + CONVERT(NVARCHAR(10), @count) + ' updates.'

SQL Query for Decline Superseded Updates SQL

Download the SQL query command to decline the superseded updates on the WSUS database.
FREE Download
WSUS stands for Windows Server Update Services

So hope using the above method will resolve your WSUS error Reset Server Node or Error: Connection Error issue. After performing the above troubleshooting steps monitor the WSUS server for a few days.

Frequency Asked Questions

What is WSUS Server?

WSUS stands for Windows Server Update Services, and it is a Microsoft tool used for managing and distributing updates and patches to Windows servers and workstations in an enterprise environment.

What is WSUS Error Reset Server Node?

This error happens if we did not perform the cleanup activity on the WSUS server for a long time. Above we have given a few scripts to clean up the WSUS server.

How to Connect WID Database?

WSUS Server by default uses the WID database if you are not using SQL DB and for troubleshooting purposes, we need to install SSMS to run the query. Below command is used to connect WID Database.

Command: \\.\pipe\MICROSOFT##WID\tsql\query

  • Last Update: 7 Minutes Ago

Hope you enjoy this information. Please tell us your thoughts and suggestions about this article. Keep reading more SEO tips & how-to guides and do follow and subscribe to our social media platforms for more latest updates.

Likes+5
Semhush
Logo