Monday, August 14, 2017

 

[EventViewer] Event ID 12012 & 7032 'The API Remoting Web Service is not working'



WSUS Event ID 12012, 7032




[Explanation]

처음에는 WSUS console이 실행이 안되서 이벤트 메시지를 확인해보니 아래와 같이 발생하였다. 정말 성가시게 동일한 메시지가 일정시간의 term을 갖고 발생하고 있었는데...
Log Name:      Application
Source:        Windows Server Update Services
Date:          7/10/2017 3:46:08 PM
Event ID:      12012
Task Category: 9
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      SERVER
Description:
The API Remoting Web Service is not working.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows Server Update Services" />
    <EventID Qualifiers="0">12012</EventID>
    <Level>2</Level>
    <Task>9</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-10T06:46:08.000000000Z" />
    <EventRecordID>179160</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SERVER</Computer>
    <Security />
  </System>
  <EventData>
    <Data>The API Remoting Web Service is not working.</Data>
  </EventData>
</Event>

더욱이 WSUS Console을 실행해보니 아래와 같이 원인을 제대로 알 수 없다는 애매한 표현만 해둘 뿐이다. 


또한 상기 메시지와 관련해서 Event ID 7032 메시지가 발생하고 있었다. 두 메시지 모두 WSUS Console이 정상적으로 구동하지 못할 때 발생하고 있었다. 



Log Name:      Application
Source:        Windows Server Update Services
Date:          7/10/2017 4:18:52 PM
Event ID:      7032
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      SERVER
Description:
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.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   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.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.UI.SnapIn.Scope.ServerSummaryScopeNode.GetUpdateServer(PersistedServerSettings settings)
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.ConnectToServer()
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.get_ServerTools()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows Server Update Services" />
    <EventID Qualifiers="0">7032</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-10T07:18:52.000000000Z" />
    <EventRecordID>179234</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SERVER</Computer>
    <Security />
  </System>
  <EventData>
    <Data>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.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   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.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.UI.SnapIn.Scope.ServerSummaryScopeNode.GetUpdateServer(PersistedServerSettings settings)
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.ConnectToServer()
   at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.get_ServerTools()</Data>
  </EventData>
</Event>

♔♔♔♔♔♔♔♔♔♔

[Cause]

구글링해서 동일한 정보가 발생한 사례를 발견하였는데, 워낙 포스팅이 오래되기도 하고 IIS에서 'HTTP Keep-Alives'를 Enable하라는 내용인데 이미 아래와 같이 기 동작 상태였다. 

기존 연결된 Connected Server을 지우고 다시 등록하려고 하니 상기 이미지와 같은 메시지가 발생하였다. 무슨 이유로 Post-installation task 진행 중인지 모르겠으나, 컴퓨터 관리에서도 동일한 메시지가 발생하여 Server를 부득이하게 재시작을 하였다. 




[Resolution]
한동안 그 원인이 무엇인지 알려고 온갖 방법을 모두 동원하였다. WSUS 및 IIS 삭제를 하고 다시 구축하였지만 시간이 얼마 가지 않아 동일한 문제가 발생하였다... 아..문제가 모지 하는 순간.... 
해결책은 단순하였고 이미 나는 그 답을 가지고 있었다. 문제는 바로 IIS의 WSUSPool이 stop 상태라서 모두 발생한 부분이었다. 혹시라도 Started된 상태로 보인다면 Restart를 진행하자.(IIS, WSUS Service, SQL Agent 서비스도 재시작을 해주면 좋다...) 우선 WsusPool에 대해 메모리 부족을 해결할 수 있는 포스팅을 링크해둔다.  http://onehundredpanda.blogspot.kr/2017/06/iis-iis-wsuspool-status-stop.html 





댓글이나 의견은 언제든지 환영합니다.

Your Comments are Always Welcome!
Share:

0 comments:

Post a Comment