wsus微軟更新服務 debug工具使用

 
wsus微軟更新服務 debug工具使用
 

   用了這麼久的wsus,感覺它非常的嬌貴,服務器上稍微有個風吹草動。馬上會提示你無法連接,或者是無法自動更新。往往最好的解決辦法是重裝一下wsus。這次我厭煩了重裝,在以前痛苦調試的基礎上,再調試一下吧。

   前兩天在服務器上啓用了第二塊網塊,安裝了短信平臺。因爲移動對短信平臺出口地址有要求,所以加了一條固定路由,本身短信平臺使用apache+mysql+jsp,應該是沒有什麼影響的。但是報錯無法連接了,具體的錯誤

[code]WSUS 管理控制檯無法通過遠程 API 連接到 WSUS 服務器。

請確保 Update Services 服務、IIS 和 SQL 正在該服務器上運行。如果該問題仍然存在,請嘗試重新啓動 IIS、SQL 和 Update Services 服務。

WSUS 管理控制檯遇到意外錯誤。這可能是暫時錯誤;請嘗試重新啓動該管理控制檯。如果此錯誤仍然存在,

請嘗試通過刪除 %appdata%\Microsoft\MMC\ 下的 wsus 文件來刪除該控制檯的永久性首選項。


System.IO.IOException -- 由於意外的數據包格式,握手失敗。

Source
System

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


System.Net.WebException -- 基礎連接已經關閉: 發送時發生錯誤。

Source
Microsoft.UpdateServices.Administration

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

       微軟本身提供了一個工具,在安裝目錄tool裏邊。wsusutil.exe,主要的參數及功能如下。

checkhealth
檢查服務器組件運行狀態,在事件查看器應用程序欄可查看結果

configuressl
更改IIS配置後刷新註冊表項

deletefrontendserver
從數據可中刪除服務器記錄

listinactiveapprovals
返回因爲修改服務器語言設置導致不活動的批准列表

removeinactiveapprovals
刪除因爲服務器語言設置不當造成的不活動的更新審批

export and import
導入和導出更新元數據,用於多臺WSUS之間的更新同步

healthmonitoring
在數據庫中配置狀態檢視值


listfrontendservers
列出數據庫中服務器信息

movecontent
更改WSUS服務器更新文件的儲存位置。對於當前儲存文件磁盤空間不足時就需要使用了。
movecontent <content path> <log file> [-skipcopy]
<content path>:內容文件的新根目錄。路徑必須存在。
<log file>    :要創建的日誌文件的路徑和文件名。
-skipcopy     :表示只應更改服務器配置,
                 不應複製內容文件。

reset
檢查WSUS數據庫中每個數據元是否於本地儲存的更新文件相同,如果丟失或損壞,下次鏈接更新服務器將重新下載更新

deleteunneededrevisions
刪除不在更新的數據元,運行此命令必須要先關掉控制檯和IIS站點服務

usecustomwebsite
更改wsus web服務端口80爲8530,可反向操作

第二個工具wsusdebugtool.exe安裝目錄裏沒有,需要到微軟的wsus主頁中去下載,主要功能

wsusdebugtool.exe /tool:purgeunneededfiles
刪除WSUS中已拒絕安裝的補丁

wsusdebugtools.exe /tool:setforegrounddownload
不使用BITS下載更新,直接連接下載

wsusdebugtool.exe /tool:getbitsstatus
查看bits工作狀態

wsusdebugtool.exe /tool:getconfiguration
查看wsus服務設置信息

WsusDebugTool.exe /Tool:GetLogs /OutputCab:c:\ServerLogs.cab
導出WSUS服務器配置及安裝等日誌進行DEBUG

最常用的就是setforgrounddownload了,可以明顯提高補丁下載速度。

 

根據我的情況,本能地選擇了wsusutil.exe" usecustomwebsite true.將服務端口更改一下。連接OK。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章