WSUS 3.0 Connection Error likely due to misconfigured IIS

A few months ago i experimented with IIS 6.0 on Win Server 2003 SP2, not knowing remembering that it was directly related to WSUS 3.0

I only changed the default website to a new one made by mydelf (although no longer required) and added FTP (also no longer required).
For some time now I have been able to use WSUS 3.0 and I'm pretty sure it's linked to IIS. I was hoping you would know of an easy fix.

Error details are here:

______________
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.

The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,

Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.


System.IO.IOException -- The handshake failed due to an unexpected packet format.

Source
System

Stack Trace:
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.TlsStream.CallProcessAuthentication(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
** this exception was nested inside of the following exception **


System.Net.WebException -- The underlying connection was closed: An unexpected error occurred on a send.

Source
Microsoft.UpdateServices.Administration

Stack Trace:
   at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)
   at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber)
   at Microsoft.UpdateServices.UI.AdminApiAccess.AdminApiTools.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber)
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.GetUpdateServer(PersistedServerSettings settings)
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.ConnectToServer()
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.get_ServerTools()
______________

I haven't yet followed any suggestions above - I'll wait for your comments first
LVL 15
Ryan_RIT Systems AdministratorAsked:
Who is Participating?
 
SteveH_UKConnect With a Mentor Commented:
I can't see anything obvious in the document you've passed, but I have the following suggestions:

1)  Make sure all paths are legitimate, so change references to LogFiles and WsusContent so that they point where they were when you did the clean install, prior to adjusting the tables.  The WsusContent folder contains all the updates, and it may be visible as a share on the server (for easy locating)
2)  In SQL Server Management Studio, make sure that the user that runs the website and the service have access to the database.  First check in the Server -> Logins, and then check in the Server -> Databases -> SUS (or whatever) -> Security.   You will probably see references to your  old server, and so just duplicate the entries for your new server.
3)  Check the EventLog to see if there are any messages from WUS

4)  Failing all of that, uninstall WUS (again, sorry) and uninstall SQL Server Express.  Install WUS directly as a clean solution.  You'll lose all your computer groups and approvals, but it will take less time to recreate all of that then it will to fix this problem, sorry. :(  If you cause updates to be automatically approved for detection only, you will be able to ascertain which computers need which patches, and approve them accordingly.

None of this is ideal, but if you can't find server/folder references (or those you do find don't fix it) in the database, and there isn't a security issue, then it will be much quicker in the long run.  This way you should be fully up to date and configured in under 48 hours, depending on your download speed.

Sorry I can't help more :(
0
 
SteveH_UKCommented:
Restarting the services won't cause you any problems, and it's a first thing to try.

You can also try and get WUS to repair its installation using Add/Remove Programs.

They are my first recommendations.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Ryan_RIT Systems AdministratorAuthor Commented:
I restarted the 'IIS Admin', 'SQL Server VSS Writer' and 'Update Service' services with no joy.
The uninstall program for WSUS 3.0 doesn't have a repair option.
0
 
SteveH_UKCommented:
Normally the repair option is on the "click here for more information" section.  Then there is a button there for repair.

If that doesn't help let me know and I'll look for an alternative method.

You can copy in the database to a new install, but it can be a right pain, so I don't recommend it unless nothing else works.  We did it to make a clean(ish) migration from WSUS 2.0 to WUS 3.0 using an intermediary server.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
I'll have a look for that repair option tomorrow

This is a virtual server so hopefully it won't be as much of a pain
0
 
SteveH_UKCommented:
If it helps, we've been running WUS 3.0 (the migrated one I mentioned) in a virtual machine using Windows Server 2003 Enterprise x64 as the host and Virtual Server 2005 R2 SP1 and Windows Server 2003 Enterprise x86 as the guest.  Its been running for around 5 months with no problems at all.  In fact, it's been better than most physical machines!  We run with around 50 clients and 800 MB RAM.  Uses very little CPU time except startup of course.
0
 
SteveH_UKCommented:
The way the (DIY) migration works is follows:

1.  Install WUS on a clean virtual machine
2.  Stop the services and copy in the SQL database from the other system
3.  Review the tables in SQL Server, using Management Studio Express or any other tool, and change any references to incorrect paths

That, if I remember correctly, was it. :)
0
 
SteveH_UKCommented:
Oh, and we did move to a virtual machine with a different IP address and a different machine name, but in the same domain.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
There was no repair installation available - it's uninstalling now.

I'll reinstall and see if it helps
0
 
SteveH_UKCommented:
I think the issue may have been if you didn't adjust the SQL database as it refers to machine names internally.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
Well I accidentally reinstalled WSUS 2.0 so I'm going to have to take that off and do 3.0 this time.

If you could let me know what steps are required to use my old database and content that would be great.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
I'm also unintalling and resinatlling IIS
0
 
SteveH_UKCommented:
Unfortunately I don't have access to a WUS machine any more.

However,

1.  Install WUS 3.0
2.  Install SQL 2005 Management Studio --- so that you can access the WUS database
3.  Stop all WUS services including the SQL Server service
4.  Copy in the database files over the clean install (perhaps take a backup copy for now, too)
5.  Start the SQL service only
3.  Using SQL 2005 Management Studio, connect to the database server instance --- it should be named in the Services.msc, or it may be discovered automatically
4.  Look at the SQL tables (you can view the contents without harming anything) for ones containing configuration data
5.  Change anything that is no longer correct and that refers to your old WUS server
6.  Attempt to start the WUS services

It is a bit trial and error, but the best you can do is to be systematic in your approach.  I think there were only 2 or 3 places where it needed changing.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
Ok - in my WSUS 3 folder I have:

SQLEXPR_ADV.EXE
SQLServer2005SP2-KB921896-x86-ENU.exe
WSUS3Setupx86.exe
(other stuff too)

I'm guessing that I don't have the Management Studio - just started downloading it now [SQLServer2005_SSMSEE.msi]

I'll let you know how I go
I'll have to go out for a few hours later on, so this might get postponed for a day or 2.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
Alright - I'm up to the stage where I open the database files in the management studio. I don't know what I have to edit from here.

The old database location was C:\WSUS\WSUSDatabase (or something like that)
This time it's located at E:\WSUSDatabase, and the content is at E:\WSUS\WsusContent  (I created the new hard drive since C: was full)

If anyone knows what edits I have to make that would be great.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
I discovered that the DB was actually stored in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

Replaced it (after backing up) with the previous DB files. Opened in Studio Manager express (no probs connecting).  Went in the Views section of SUSDB. Opened the vwConfiguration view and changed the 'LocalContentCacheLocation' item from C:\WSUS\WSUSContent to E:\WSUS\WSUSContent  - saved the DB, started the WSUS service and tried to connect - but got another connection error. (Also tried reverting setting to 'C:\WSUS\.....'

When trying to connect in the MMC the error is that 'Cannot connect to SERVER. SQL server may not be running on the server. Please verify that SQL Server is running and configured correctly on the server. Contact administrator.....'

I'm hoping you know what needs to be done from here   :)
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
One final detail before I head off - my previous WSUS 3 setup used Windows Internal Database. At the moment I don't have it installed but am using SQL Server 2005 Express SP2.
0
 
SteveH_UKCommented:
The database should have been installed with the WUS installation, so you needed to overwrite that database.

You'll need to know the instance name, and I can't remember it at present.  Sorry, I'm at work!  Can't do much during work hours.

Try looking in the registry under LOCAL_MACHINE and SQL Server (in Software) to find the instance name for WUS.
0
 
SteveH_UKCommented:
I'm slightly concerned that you may be viewing the wrong database instances.

WSUS v2 called itself WSUS, but WSUS v3 tends to call itself WUS.  When installed on a server with WSUS v2, it creates a new database using the Windows Database, rather than a standard SQL 2005 or MSDE install.

I'm not sure that your comments regarding the WSUS folder are actually talking about the original WUS v3 database.

Also, if you install WUS v3 on a clean system, it will normally install its own database and I'm pretty sure it does not install the database files in the SQL Server directory, although the SQL Server application files are installed there.

Can I recommend that you review your old and new systems for files with the extension .mdf as these are typical SQL database files.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
OK. Here's what's happened from the top.
Had a working WUS 3 server. Everything stored in a folder called C:\WSUS, used http port 80, used Win Internal DB

I went into IIS manager one day and changed the settings in Default Site to use a website I had made and might have changed some security settings, not realising that WUS used it as well. That stuffed up the connection.

Uninstalled WUS 3 and removed IIS. Installed SQL Server 2005 Express SP2 and Studio Management.

Installed WUS 3 - told it to use E:\WSUS\WSUSContent folder and to use the SQL Server Instance (\\SERVER03\SQLEXPRESS) that was already installed on the machine (likely made when I installed SQL Server) (didn't make a new one using the Internal DB).

Finshed setting up WUS 3, decided to use port 8530 this time, and had no problems connecting. Stopped the services, copied my old Database over and renamed the newly made ones just in case they're needed. Started SQL service and made that edit I mentioned above.

That's where I'm at at the moment. I believe the instance name is different to the one previously used. Don't know how to change it. Don't know if there are any others to choose from. The currently used DB is definately stored in the Program Files folder.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
0
 
SteveH_UKCommented:
OK, sounds like the database access should be fine, then.

Can you upload a screenshot of the tables.  The tables ensure that we access the data and don't worry about anything else!

I'll be able to assist more at lunchtime (UK) and this evening (UK).
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
Tables screenshot is here: https://filedb.experts-exchange.com/incoming/ee-stuff/5854-tables.jpg

Any suggestions on how to get everything working now?
0
 
SteveH_UKCommented:
Can you upload a screen shot of the remaining tables too! Thanks.

Try openng the tbConfiguration, tbConfigurationA, tbConfigurationB, tbConfigurationC tables.  If you need help, feel free to upload more screenshots, or a zip containing them.
0
 
SteveH_UKCommented:
When I was first doing this, I checked every single table, looking for references to WUS servers.  Some of the tables are exactly what they say, so you can ignore them.  Remember as well that computers and WUS servers are quite distinct.  A WUS server may also request updates, and so it'll be listed as a computer, but that's not something to worry about changing.
0
 
SteveH_UKCommented:
I'm not going to get a chance to look at this now, sorry.  I'll be online this evening and will post more.
0
 
SteveH_UKCommented:
Can I recommend that you also schedule regular System State backups, as these include the complete IIS configuration, and so you can recover IIS settings in case you need to.
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
So you are suggesting to reinstall WUS 3, keep the 3GB of Content but get WUS to re-download the 256MB worth of database again?

Just confirming.
0
 
SteveH_UKCommented:
Yes.  If you store the content files in the same folder, WUS didn't re-download them for us.  We used this approach in migrating from WSUS 2 to 3 via an intermediary server.

If you have a decent connection, you can schedule the main download for the weekend!  Or start it when you go home and stop it each morning until it catches up!
0
 
Ryan_RIT Systems AdministratorAuthor Commented:
Well I've gone over the monthly allowance - so speed is only at 128kb
The only consolation is that I can download as much as possible until the end of the month.

BTW, I was wondering if you might know if it's possible to get the host OS to get it's updates from the Virtual machine being run on it. ie I run Vista Ultimate and have 2003 SP2 on as the Virtual machine. I'm not sure if it works because my machine has to restart, at which point the server can't be running? Does the server need to be running, or should I make a downstream server on another pc? Or was this just a bug with the Windows Updates client that has been fixed by the stealth updates?
0
 
SteveH_UKCommented:
I can see your frustration with the downloads.  Ouch!

We do exactly what you suggest.  We've used a 2003 Virtual Server running a 2003 VM with WUS v3, and both computers update directly from this WUS.

The Automatic Updates client should download updates prior to installing them, so access to the WUS server is not required.  We did have a problem with WSUS v2, without a VM!, but no problems with v3.

Make sure you have VM additions installed and a local account to run the VM, so that shutdown and startup are efficient.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.