SE の雑記

SQL Server の情報をメインに Microsoft 製品の勉強内容を日々投稿

WSUS の管理コンソールに突然つながらなくなりました…

leave a comment

最近、自宅の検証環境に Windows Update Services (WSUS) を導入しました。
image

新しい検証サーバーをデプロイして、Windows Update の参照先として構築した WSUS を設定したのですが更新プログラムの適用をすることができませんでした。

どうしてだろうと思って、WSUS の管理コンソールを開いてみたところこのようの画面になっていました…。
image

エラーの内容を見てみたところこのような内容が。

WSUS 管理コンソールは、リモート API 経由で WSUS サーバーに接続できませんでした。

Update Services サービス、 IIS および SQL がサーバー上で実行されていることを確認してください。問題が解決しない場合は、IIS、SQL、および Update Services サービスを再起動してみてください。

System.Net.WebException — HTTP ステータス 401: Unauthorized で要求が失敗しました。

Source
System.Web.Services

Stack Trace:
   場所 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   場所 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   場所 Microsoft.UpdateServices.Internal.ApiRemoting.ExecuteSPGetUpdateServerStatus(Int32 updateSources, Boolean includeDownstreamComputers, String updateScopeXml, String computerTargetScopeXml, String preferredCulture, Int32 publicationState, Int32 propertiesToGet)
   場所 Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPGetUpdateServerStatus(UpdateSources updateSources, Boolean includeDownstreamComputers, String updateScopeXml, String computerTargetScopeXml, String preferredCulture, ExtendedPublicationState publicationState, UpdateServerStatusPropertiesToGet propertiesToGet)
   場所 Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetStatus(UpdateSources updateSources, Boolean includeDownstreamComputers, UpdateScope updatesToInclude, ComputerTargetScope computersToInclude, UpdateServerStatusPropertiesToGet propertiesToGet)
   場所 Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetReplicaStatus(UpdateSources updateSources)
   場所 Microsoft.UpdateServices.UI.SnapIn.Common.CachedUpdateServerStatus.GetFreshObjectForCache()
   場所 Microsoft.UpdateServices.UI.AdminApiAccess.CachedObject.GetFromCache()
   場所 Microsoft.UpdateServices.UI.SnapIn.Pages.ServerSummaryPage.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

IIS / SQL Server / Update Service も正常に起動はしているのですよね…。

管理コンソールで再接続をしようとしてもこのようなエラーが。
image

‘2008R2-WSUS-01’ に接続できません。
サーバーが別のポートを使用しているか、別の SSL (Secure Sockets Layer) 設定を使用している可能性があります。

 

WSUS の Web サービスを開こうとしてもエラーとなっていました。
image

‘/ApiRemoting30’ アプリケーションでサーバー エラーが発生しました。
——————————————————————————–

要求形式が認識されません。
説明: 現在の Web 要求を実行中に、ハンドルされていない例外が発生しました。エラーに関する詳細および例外の発生場所については、スタック トレースを参照してください。

例外の詳細: System.InvalidOperationException: 要求形式が認識されません。

ソース エラー:

現在の Web 要求の実行中にハンドルされていない例外が生成されました。障害の原因および発生場所に関する情報については、下の例外スタック トレースを使って確認できます。 

スタック トレース:

[InvalidOperationException: 要求形式が認識されません。]
   System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +401178
   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +281
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +425
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

 

——————————————————————————–
バージョン情報: Microsoft .NET Framework バージョン:2.0.50727.4952; ASP.NET バージョン:2.0.50727.4955

WSUS のログは [C:Program FilesUpdate ServicesLogFilesSoftwareDistribution.log] に出力がされているのですが、このログには以下のように出力がされていました。

2010-11-20 13:27:35.395 UTC    Error    WsusService.8    HmtWebServices.CheckDssAuthWebService    DssAuth WebService SoapException:System.Web.Services.Protocols.SoapException: System.W
eb.Services.Protocols.SoapException: サーバーは要求を処理できませんでした。 —> System.InvalidOperationException: 一時クラスを生成できません (result=1)。
error CS2001: ソース ファイル ‘C:WindowsTEMPy4sk819r.0.cs’ が見つかりませんでした。
error CS2008: 入力が指定されていません。

   場所 System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   場所 System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   場所 System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   場所 System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence)
   場所 System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
   場所 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   場所 System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   場所 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
   — 内部例外スタック トレースの終わり —
   場所 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   場所 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   場所 Microsoft.UpdateServices.Internal.DssAuthWebService.DssAuthWebService.Ping(Int32 pingLevel)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckDssAuthWebService(EventLoggingType type, HealthEventLogger logger)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckDssAuthWebService(EventLoggingType type, HealthEventLogger logger)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HealthMonitoringTasks.ExecuteSubtask(HealthMonitoringSubtask subtask, EventLoggingType type, HealthEventLogger logger)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HealthMonitoringTasks.Execute(EventLoggingType type)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HealthMonitoringThreadManager.Execute(Boolean waitIfNecessary, EventLoggingType loggingType)
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.HealthMonitoringThreadManager.PeriodicTask()
   場所 Microsoft.UpdateServices.Internal.HealthMonitoring.PeriodicTaskExecuter.ThreadStart()
   場所 System.Threading.ExecutionContext.runTryCode(Object userData)
   場所 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Threading.ThreadHelper.ThreadStart()

情報を探してみたところ、以下のようなものがありました。
ASP.NET 2.0 をユーザー アカウントで実行されるように構成するとエラー メッセージ "一時クラスを生成できません" が表示される
Issues with the WSUS 3.0 Administration Console
WSUS に関連した Web サービスが、Windows Server 2003 ベースのコンピューターを Windows Server 2008 にアップグレードするときの動作を停止します。
WSUS Install Fails; There is a problem with this Windows Installer package.
そこが知りたい Windows Server Update Services(第3回)

今回の現象ですが、最後の [そこが知りたい Windows Server Update Services(第3回)] に記載されている現象が原因のようでした。

[C:Windowstemp]  から [Network Service] の権限が外れてしまっていたため Web サービスを実行した際の一時クラスが生成できずエラーになってしまったみたいですね。

[フォルダーの一覧/データの読み取り] の権限を付与したところエラーを回避することができました。
image

どうして突然外れてしまったのかはわからないのですが今後、同様の現象が発生した際の対応策のメモとして残しておきたいと思います。

Share

Written by Masayuki.Ozawa

11月 20th, 2010 at 11:06 pm

Posted in Windows Server

Tagged with

Leave a Reply