WSUS 2012R2 für Verteilung von Windows 10 Upgrades vorbereiten

Mit der neusten Version des Windows Update Services bietet Microsoft jetzt endlich auch die Möglichkeit, Upgrades für Windows 10 bereitzustellen.
Dafür wird die WSUS Version „Build 6.3.9600.18324“ vorausgesetzt. Das aktuellste Patchlevel könnt ihr bei wsus.de einsehen (ganz runter scrollen).
In der Regel fehlen bei einem 2012 R2 Server lediglich die beiden Patches: KB3095113 sowie KB3159706 die mittlerweile aber auch per Automatische Updates verteilt werden.
In meinem Fall lies sich danach der WSUS nicht mehr starten, was sich über den Eventlog Eintrag: „Update Services failed its initialization and stopped.“ ausdrückte.

Aus der Fehlermeldung lies sich jetzt noch nicht das Problem erkennen. Das etwas detailliertere Logfile findet sich unter:

C:\Program Files\Update Services\LogFiles\SoftwareDistribution.txt

Dort fand sich dann das eigentliche Problem:

2017-04-24 09:35:55.755 UTC Info WsusService.6 SusService.SusServiceStartUpThreadProc WSUS Server Version: 6.3.9600.18324
2017-04-24 09:36:19.724 UTC Error WsusService.6 SusService.SusServiceStartUpThreadProc WUS Service failed during startup processing, sleeping before retry - Error Details: System.Data.SqlClient.SqlException (0x80131904): Cannot open database "SUSDB" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.Connect(String connectionString)
at Microsoft.UpdateServices.Internal.DataAccess.ExecuteSPUpdateServerHealthStatus(String componentName, Boolean isRunning)
at Microsoft.UpdateServices.EventSystem.SusService.SusServiceStartUpThreadProc()
ClientConnectionId:5ef465d2-f07e-466e-a09d-ab40a02d50e8

Mit dieser Fehlermeldung kommt man auf den KB3159706 von Microsoft. Dort wird erklärt, dass noch die folgenden manuelle Schritte notwendig sind um die Installation der beiden vorherigen KB’s abzuschließen:

  1. Als Administrator in der Konsole ausführen
    C:\Program Files\Update Services\Tools\wsusutil.exe" postinstall /servicingführt zu folgendem Output:
    Log file is located at C:\Users\Username\AppData\Local\Temp\2\tmp46DF.tmp
    Post install is starting
    Post install has successfully completed
  2. Im Server Manager über „Add Roles and Features“ das „HTTP Activation“ Feature für .NET Framework 4.5 aktivieren
  3. Den WSUS Dienst neustarten
    net stop WsusService && net start WsusService

Für diejenigen, wo kein SSL für ihren WSUS aktiviert haben, war es dass an dieser Stelle. Wer SSL benutzt bekommt eventuell in dem Moment noch die folgende Fehlermeldung zu Gesicht: „The Client Web Service is not working.“

In diesem Fall muss noch die web.config Datei des Webservices angepasst werden.
 

  1. Wieder als Administrator per cmd ausführen:
    cd C:\Program Files\Update Services\WebServices\ClientWebService\
    takeown /f web.config /a
    icacls "C:\Program Files\Update Services\WebServices\ClientWebService\Web.config" /grant administrators:f
    
  2. Weitere Endpoint Einträge in der Datei „C:\Program Files\Update Services\WebServices\ClientWebService\Web.Config“ hinzufügen.
    Hier am einfachsten nach „endpoint address“ suchen. Der Block fängt mit folgenden Zeilen an:

    <services>
    <service
    name="Microsoft.UpdateServices.Internal.Client"
    behaviorConfiguration="ClientWebServiceBehaviour">

    Anschließend kommen die Einträge der Endpoints, zu denen ihr die folgenden dazu kopiert:

    <!--
    These 4 endpoint bindings are required for supporting both http and https
    -->
    <endpoint address=""
    binding="basicHttpBinding"
    bindingConfiguration="SSL"
    contract="Microsoft.UpdateServices.Internal.IClientWebService" />
    <endpoint address="secured"
    binding="basicHttpBinding"
    bindingConfiguration="SSL"
    contract="Microsoft.UpdateServices.Internal.IClientWebService" /> 

    Der restliche Teil des Eintrages sieht zur Vollständigkeit wie folgt aus:

    <endpoint address=""
    binding="basicHttpBinding"
    bindingConfiguration="ClientWebServiceBinding"
    contract="Microsoft.UpdateServices.Internal.IClientWebService" />
    <endpoint address="secured"
    binding="basicHttpBinding"
    bindingConfiguration="ClientWebServiceBinding"
    contract="Microsoft.UpdateServices.Internal.IClientWebService" />
    </service>
    </services> 
  3. Jetzt noch ganz unten in der Datei den letzten Eintrag wie folgt anpassen/hinzufügen:
    </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel> 
  4. Jetzt zur Sicherheit nochmal das System neustarten, Fertig.